Skip to content

chore: add actionlint and markdownlint pre-commit hooks#196

Open
SudipSinha wants to merge 1 commit into
mainfrom
chore/add-actionlint-markdownlint
Open

chore: add actionlint and markdownlint pre-commit hooks#196
SudipSinha wants to merge 1 commit into
mainfrom
chore/add-actionlint-markdownlint

Conversation

@SudipSinha

@SudipSinha SudipSinha commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Adds two pre-commit hooks:

actionlint

Validates .github/workflows/*.yml files 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

  • Fix all markdown violations in README.md and CONTRIBUTING.md so the hook passes on existing files
  • Update CONTRIBUTING.md tool references (flake8/mypy -> ruff/pyrefly)
  • Remove CLAUDE.md from 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
  • All pre-commit hooks pass (including new actionlint + markdownlint)

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores

    • Enhanced development tooling with additional CI workflow and Markdown linting validation.
  • Documentation

    • Updated contributor setup instructions to reference the uv package manager.
    • Refreshed project README with clearer service descriptions and improved section organization.
    • Removed outdated documentation file.

- 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>
@SudipSinha SudipSinha self-assigned this Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds actionlint and markdownlint-cli2 (with --fix) hooks to .pre-commit-config.yaml. Removes CLAUDE.md. Rewrites README.md with restructured algorithm sections, reformatted Building/Running/TLS/Testing/Protobuf documentation, and updates CONTRIBUTING.md with explicit uv-based installation steps and revised pre-commit tooling references.

Changes

Tooling and Documentation Update

Layer / File(s) Summary
New actionlint and markdownlint-cli2 hooks
.pre-commit-config.yaml
Appends two hook repository entries: rhysd/actionlint for CI workflow linting and DavidAnson/markdownlint-cli2 for Markdown linting with --fix argument.
README restructure and CONTRIBUTING updates
README.md, CONTRIBUTING.md, CLAUDE.md
Rewrites README opening description, splits Native Algorithms into Drift/Fairness subsections and Imported Algorithms into Explainability/LLM Evaluation subsections, reformats Building extras bullets, TLS Support environment variable listing, Testing subsections, and Protobuf Support intro. Updates CONTRIBUTING with uv venv/uv pip install steps and names ruff/pyrefly as pre-commit tools. Removes CLAUDE.md entirely.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐇 A rabbit tidies up the den,
with linting hooks for Markdown and CI again.
The README blooms in structured rows,
contributing guide now clearly shows.
CLAUDE.md hops away — so long, old friend! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary changes: adding actionlint and markdownlint pre-commit hooks, which is the main focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/add-actionlint-markdownlint

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.

@SudipSinha SudipSinha added documentation Improvements or additions to documentation enhancement New feature or request configuration low-priority Quality improvements with no urgency labels Jun 18, 2026
@SudipSinha SudipSinha marked this pull request as ready for review June 18, 2026 17:03
@SudipSinha SudipSinha added the ok-to-test Proceed with CI testing label Jun 18, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

24-25: ⚡ Quick win

Consider documenting all pre-commit hooks for completeness.

The pre-commit description mentions ruff and pyrefly, but the updated .pre-commit-config.yaml now includes actionlint and markdownlint-cli2 hooks 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

📥 Commits

Reviewing files that changed from the base of the PR and between eeca7e6 and 89daf55.

📒 Files selected for processing (4)
  • .pre-commit-config.yaml
  • CLAUDE.md
  • CONTRIBUTING.md
  • README.md
💤 Files with no reviewable changes (1)
  • CLAUDE.md

Comment thread README.md

### Available Extras

Pass these extras as a comma separated list, e.g., `"mariadb,protobuf"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
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

@github-actions

Copy link
Copy Markdown

PR image build and manifest generation completed successfully!

📦 PR image: quay.io/trustyai/trustyai-service-python-ci:89daf554c9dfd786f56008ebfc5ee5d697750580

🗂️ CI manifests

devFlags:
  manifests:
    - contextDir: config
      sourcePath: ''
      uri: https://api.github.com/repos/trustyai-explainability/trustyai-service-operator-ci/tarball/service-python-89daf554c9dfd786f56008ebfc5ee5d697750580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration documentation Improvements or additions to documentation enhancement New feature or request low-priority Quality improvements with no urgency ok-to-test Proceed with CI testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant