chore: standardize pre-commit hooks to repo-local pattern#19
Conversation
- 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)
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.ymlto 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. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Convert string-to-array iteration for settings_keys and files variables to use mapfile, fixing incorrect single-iteration behavior flagged by Copilot review.
Summary
--checkmode for security hardening validation--no-progressflag removed in newer vale versionsTest plan
pre-commit run --all-filespasses all hooks (including shellharden, vale, yamllint)