-
Notifications
You must be signed in to change notification settings - Fork 49
build(lint): consolidate linters under pre-commit #903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LalatenduMohanty
merged 5 commits into
python-wheel-build:main
from
MichaelYochpaz:move-linters-to-pre-commit
Mar 30, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d6e956d
build(lint): consolidate linters under pre-commit
MichaelYochpaz fbb8065
build(lint): replace markdownlint with mdformat for Markdown linting
MichaelYochpaz 0be84aa
style(docs): align Markdown formatting to mdformat linter
MichaelYochpaz f81e85c
style(e2e): apply ruff formatting fixes
MichaelYochpaz e81773b
chore: add `.git-blame-ignore-revs` to exclude formatting commits fro…
MichaelYochpaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # This file lists commits that should be ignored by `git blame`. | ||
| # To read more, see: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view | ||
|
|
||
| # MDFormat Markdown formatting alignment | ||
| 0be84aaf1f350aae7a40e1dc7d6fc07711d87277 | ||
|
|
||
| # Ruff formatting alignment | ||
| f81e85ca9f02941cc012e82c189db417d4fed9ca |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Use consecutive numbering for ordered lists (1, 2, 3 instead of 1, 1, 1) | ||
| number = true | ||
|
|
||
| # Preserve original line wrapping | ||
| wrap = "keep" | ||
|
|
||
| [plugin.tables] | ||
| # Strip extra spaces from GFM tables (don't pad columns for alignment) | ||
| compact_tables = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,63 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.5.0 | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: end-of-file-fixer # Ensures single trailing newline | ||
| - id: trailing-whitespace # Removes trailing spaces | ||
| args: [--markdown-linebreak-ext=md] # Preserve markdown line breaks | ||
| - id: check-yaml # Validates YAML syntax | ||
| - id: check-merge-conflict # Prevents merge conflict markers | ||
| - id: check-toml # Validates TOML syntax | ||
| - id: end-of-file-fixer | ||
| - id: trailing-whitespace | ||
| args: [--markdown-linebreak-ext=md] | ||
| - id: check-yaml | ||
| - id: check-merge-conflict | ||
| - id: check-toml | ||
|
|
||
| - repo: https://github.com/igorshubovych/markdownlint-cli | ||
| rev: v0.39.0 | ||
| - repo: https://github.com/mgedmin/check-python-versions | ||
| rev: "0.24.0" | ||
| hooks: | ||
| - id: markdownlint | ||
| args: [--config, .markdownlint-config.yaml] | ||
| - id: check-python-versions | ||
| args: ["--only", "pyproject.toml,.github/workflows/test.yaml"] | ||
|
|
||
| - repo: local | ||
| - repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||
| rev: 3.2.1 | ||
| hooks: | ||
| - id: hatch-lint | ||
| name: hatch lint check | ||
| entry: hatch run lint:check | ||
| language: system | ||
| types: [python] | ||
| pass_filenames: false | ||
| - id: editorconfig-checker | ||
| alias: ec | ||
| # Exclude files that are auto-generated or strictly formatted elsewhere | ||
| exclude: | | ||
| (?x)^( | ||
| LICENSE| | ||
| .*\.lock| | ||
| dist/.* | ||
| )$ | ||
|
|
||
| - repo: https://github.com/hukkin/mdformat | ||
| rev: 1.0.0 | ||
| hooks: | ||
| - id: mdformat | ||
| additional_dependencies: | ||
| - mdformat-gfm # GitHub Flavored Markdown support (tables, autolinks, etc.) | ||
| - mdformat-simple-breaks # Use --- for thematic breaks instead of 70 underscores | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.11.11 | ||
| hooks: | ||
| # Linter runs before formatter so fixes (like removing imports) get formatted | ||
| - id: ruff-check | ||
| args: [--fix] | ||
| types_or: [python, pyi] | ||
| - id: ruff-format | ||
| types_or: [python, pyi] | ||
LalatenduMohanty marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: hatch-mypy | ||
| name: hatch mypy check | ||
| entry: hatch run mypy:check | ||
| language: system | ||
| types: [python] | ||
| pass_filenames: false | ||
|
|
||
| - id: mergify-lint | ||
| name: mergify lint | ||
| entry: hatch run lint:mergify | ||
| language: system | ||
| files: ^\.mergify\.yml$ | ||
| pass_filenames: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.