Skip to content

chore: standardize pre-commit hooks to repo-local pattern#19

Merged
gamaware merged 2 commits intomainfrom
chore/sync-pre-commit-patterns
Mar 22, 2026
Merged

chore: standardize pre-commit hooks to repo-local pattern#19
gamaware merged 2 commits intomainfrom
chore/sync-pre-commit-patterns

Conversation

@gamaware
Copy link
Owner

Summary

  • Convert gitleaks, shellcheck, and shellharden hooks from remote repos to local system hooks for consistent behavior across environments
  • Use shellharden --check mode for security hardening validation
  • Fix vale hook --no-progress flag removed in newer vale versions
  • Update yamllint config to canonical pattern (120 max line length, truthy check-keys false, comments min-spaces 1, consistent indent-sequences)
  • Fix pre-existing shellharden violations in shell scripts (array expansion, string comparison operators)

Test plan

  • pre-commit run --all-files passes all hooks (including shellharden, vale, yamllint)
  • CI quality checks pass
  • CodeRabbit review addressed
  • Copilot review addressed

- Convert gitleaks, shellcheck, and shellharden from remote repos to
  local system hooks for consistent behavior across environments
- Use shellharden --check mode (security hardening, not formatting)
- Fix vale hook --no-progress flag removed in newer vale versions
- Update yamllint config: max line length 120, truthy check-keys
  false, comments min-spaces 1, consistent indent-sequences
- Fix shellharden violations in sync-repo-settings.sh and
  generate-report.sh (array expansion, string comparison operators)
Copilot AI review requested due to automatic review settings March 22, 2026 19:57
@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

Warning

Rate limit exceeded

@gamaware has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 10e62d33-9f64-427e-ba86-54b06ac7ce92

📥 Commits

Reviewing files that changed from the base of the PR and between 92266f9 and 8c7ef1e.

📒 Files selected for processing (4)
  • .pre-commit-config.yaml
  • .yamllint.yml
  • scripts/generate-report.sh
  • scripts/sync-repo-settings.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-pre-commit-patterns

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Standardizes repository pre-commit tooling/config to a repo-local “system hook” pattern and aligns lint configs/hook invocations with newer tool behaviors, while also addressing shellharden-driven shell script adjustments.

Changes:

  • Convert gitleaks/shellcheck/shellharden pre-commit hooks from remote repos to repo: local + language: system, and adjust vale invocation.
  • Update .yamllint.yml to a stricter/canonical linting profile (notably 120 char line length).
  • Apply shellharden-motivated edits to shell scripts (string emptiness checks and loop/expansion tweaks).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
scripts/sync-repo-settings.sh Shellharden-oriented edits; introduces a loop regression where newline-delimited strings are incorrectly treated as bash arrays.
scripts/generate-report.sh Adjust emptiness check for GITHUB_OUTPUT in a shellharden-friendly way.
.yamllint.yml Tightens and standardizes yamllint rules (line length, truthy handling, indentation, comments spacing).
.pre-commit-config.yaml Moves several hooks to local/system execution; removes vale --no-progress.

@gamaware
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 22, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Convert string-to-array iteration for settings_keys and files
variables to use mapfile, fixing incorrect single-iteration
behavior flagged by Copilot review.
@gamaware gamaware merged commit 23023fb into main Mar 22, 2026
10 checks passed
@gamaware gamaware deleted the chore/sync-pre-commit-patterns branch March 22, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants