-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add Sphinx Lint to pre-commit #1786
base: main
Are you sure you want to change the base?
Changes from all commits
df7ef72
6339a91
e2a552e
08107d5
eb1cf39
983d39f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,22 @@ ci: | |
autoupdate_schedule: quarterly | ||
|
||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add explanation somewhere why one check replaces the other instead of being additional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take a guess based on what I saw: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh.. I wish that was more apparent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking about it... It's rather suboptimal: if we ever start having symlinks, they won't be checked after this patch because nobody will remember to re-add it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. But perhaps it means we don't want There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After trying it in coveragepy, I removed |
||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: requirements-txt-fixer | ||
hugovk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
|
@@ -37,7 +43,12 @@ repos: | |
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.1 | ||
rev: v0.9.1 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/sphinx-contrib/sphinx-lint | ||
rev: v1.0.0 | ||
hooks: | ||
- id: sphinx-lint |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
furo==2024.8.6 | ||
sphinx==7.2.6 | ||
sphinx-autobuild==2021.3.14 | ||
sphinx-inline-tabs==2023.4.21 | ||
sphinx-copybutton==0.5.2 | ||
sphinx-inline-tabs==2023.4.21 | ||
sphinx-toolbox==3.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the justification here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagged by the
check-hooks-apply
hook. Shall I removecheck-hooks-apply
and re-addcheck-symlinks
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagged by the
check-hooks-apply
hook:Shall I remove
check-hooks-apply
and re-addcheck-symlinks
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honesty, not sure. I was just trying to understand how different bits of the PR might be related to the declared goal and each other...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ned ended up not using this check: #1786 (comment). Perhaps, we shouldn't either.