chore: add actionlint and markdownlint pre-commit hooks#196
Conversation
- Add actionlint for GitHub Actions workflow validation - Add markdownlint-cli2 with --fix for markdown linting - Fix markdown violations in README.md and CONTRIBUTING.md - Remove CLAUDE.md from git tracking (project-specific file) Signed-off-by: Sudip Sinha <Sudip.Sinha@RedHat.com>
📝 WalkthroughWalkthroughAdds ChangesTooling and Documentation Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
CONTRIBUTING.md (1)
24-25: ⚡ Quick winConsider documenting all pre-commit hooks for completeness.
The pre-commit description mentions
ruffandpyrefly, but the updated.pre-commit-config.yamlnow includesactionlintandmarkdownlint-cli2hooks as well. Contributors would benefit from knowing the full set of checks they're running. Additionally, confirm that "pyrefly" is the correct tool name (possibly "pyright"?).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CONTRIBUTING.md` around lines 24 - 25, In the CONTRIBUTING.md file at the section describing pre-commit checks, update the documentation to list all active hooks currently configured in the project. Replace the incomplete mention of ruff and pyrefly with a comprehensive list that includes ruff for code formatting, pyright for type checking (verify and correct the tool name from pyrefly to pyright), actionlint for GitHub Actions validation, and markdownlint-cli2 for markdown linting. This ensures contributors are aware of all checks they need to satisfy before committing code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 59: In the README.md file at line 59, update the phrase "comma separated
list" to use the hyphenated compound adjective form "comma-separated list" for
proper grammar when describing the list format in the extras parameter
documentation.
---
Nitpick comments:
In `@CONTRIBUTING.md`:
- Around line 24-25: In the CONTRIBUTING.md file at the section describing
pre-commit checks, update the documentation to list all active hooks currently
configured in the project. Replace the incomplete mention of ruff and pyrefly
with a comprehensive list that includes ruff for code formatting, pyright for
type checking (verify and correct the tool name from pyrefly to pyright),
actionlint for GitHub Actions validation, and markdownlint-cli2 for markdown
linting. This ensures contributors are aware of all checks they need to satisfy
before committing code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fbaca0ec-5aa3-4e06-a6bc-455cfd68d032
📒 Files selected for processing (4)
.pre-commit-config.yamlCLAUDE.mdCONTRIBUTING.mdREADME.md
💤 Files with no reviewable changes (1)
- CLAUDE.md
|
|
||
| ### Available Extras | ||
|
|
||
| Pass these extras as a comma separated list, e.g., `"mariadb,protobuf"` |
There was a problem hiding this comment.
Use hyphenated adjective form for clarity.
Line 59 should read "comma-separated list" instead of "comma separated list" to properly use a compound adjective.
✏️ Proposed fix
-Pass these extras as a comma separated list, e.g., `"mariadb,protobuf"`
+Pass these extras as a comma-separated list, e.g., `"mariadb,protobuf"`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Pass these extras as a comma separated list, e.g., `"mariadb,protobuf"` | |
| Pass these extras as a comma-separated list, e.g., `"mariadb,protobuf"` |
🧰 Tools
🪛 LanguageTool
[grammar] ~59-~59: Use a hyphen to join words.
Context: ...ble Extras Pass these extras as a comma separated list, e.g., `"mariadb,protobuf...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 59, In the README.md file at line 59, update the phrase
"comma separated list" to use the hyphenated compound adjective form
"comma-separated list" for proper grammar when describing the list format in the
extras parameter documentation.
Source: Linters/SAST tools
|
PR image build and manifest generation completed successfully! 📦 PR image: 🗂️ CI manifests |
Summary
Adds two pre-commit hooks:
actionlint
Validates
.github/workflows/*.ymlfiles for correctness — catches YAML syntax errors, invalid action references, expression typos, and deprecated features before they reach CI. Runs only when workflow files are modified.markdownlint-cli2
Lints markdown files against markdownlint rules and auto-fixes formatting issues (
--fix). Catches missing blank lines around headings/fences, inconsistent list markers, missing code block language tags, etc. Runs with default rules, no config file needed.Other changes
README.mdandCONTRIBUTING.mdso the hook passes on existing filesCONTRIBUTING.mdtool references (flake8/mypy->ruff/pyrefly)CLAUDE.mdfrom git tracking (project-specific Claude Code instructions file, accidentally committed in PR build: enable strict ruff linting and CI enforcement #122)Test plan
npx markdownlint-cli2 CONTRIBUTING.md README.md— 0 errors🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Chores
Documentation
uvpackage manager.