Skip to content

feat: Add pre-commit configuration for markdown files#6466

Closed
MUFFANUJ wants to merge 1 commit intopipe-cd:masterfrom
MUFFANUJ:pre-commit-hooks
Closed

feat: Add pre-commit configuration for markdown files#6466
MUFFANUJ wants to merge 1 commit intopipe-cd:masterfrom
MUFFANUJ:pre-commit-hooks

Conversation

@MUFFANUJ
Copy link
Copy Markdown

What this PR does:
This PR introduces an optional pre-commit configuration to help maintain Markdown file hygiene. It adds a
.pre-commit-config.yaml file with the following hooks, configured to run only on Markdown (.md) files:

  • trailing-whitespace: Trims trailing whitespace.
  • end-of-file-fixer: Ensures files end with a newline.
  • check-merge-conflict: Prevents committing unresolved merge conflicts.
  • codespell: Checks for common spelling errors.
    Why we need it:

Which issue(s) this PR fixes:

  • To provide quick, local feedback to contributors on common formatting issues (whitespace, EOF) without waiting for CI.
  • To catch merge conflict markers before they are accidentally committed.
  • To help catch spelling errors in documentation.
  • To improve the overall quality of documentation contributions with minimal friction.

Fixes #6424

Visuals:

Screen.Recording.2026-01-27.at.1.19.13.PM.mov

Does this PR introduce a user-facing change?:

  • How are users affected by this change: Contributors can optionally use pre-commit hooks to automatically lint their Markdown changes locally.
  • Is this breaking change: NO
  • How to migrate (if breaking change): N/A

@MUFFANUJ MUFFANUJ requested a review from a team as a code owner January 27, 2026 07:50
…s optional setup in the contributing guide.

Signed-off-by: anujkumar.singh <anujsinghhero292@gmail.com>
eeshaanSA

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@eeshaanSA eeshaanSA left a comment

Choose a reason for hiding this comment

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

Hi, we discussed this in the community meeting. Sounds like a good idea. Though, we are not sure of the scope of the pre-commit hooks. It is best to only limit it to v1 docs, and not the other versions. Additionally, it might just be better if we add a CI for this instead of an optional pre-commit hook, because most contributors would ignore it anyway.

Copy link
Copy Markdown
Contributor

@Ayushmore1214 Ayushmore1214 left a comment

Choose a reason for hiding this comment

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

Looks good

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Mar 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR was closed because it has been stalled for 7 days with no activity. Feel free to reopen if still applicable.

@github-actions github-actions Bot closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional pre-commit hooks for local contributor checks

3 participants