-
Notifications
You must be signed in to change notification settings - Fork 107
Consistent developer tooling; refactor formatting CI #3315
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
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dbb6959
dev: Add pre-commit config
ZedThree 9e29906
docs: Ignore venv directories
ZedThree 0f27627
docs: Describe formatters and linters used in the project
ZedThree da01a26
maint: Ignore noisy `clang-tidy` warning
ZedThree 8f24e1e
maint: Enforce `const` on the left of types
ZedThree 64bf672
maint: Add `clangd` config for editors
ZedThree d4692f0
CI: Don't add formatting commits to `.git-blame-ignore-revs`
ZedThree 95f7f17
CI: Run all formatters and linters through `prek`
ZedThree 74b00f8
docs: Expand description of developer tools
ZedThree c37f698
CI: Use annotations instead of comments for `clang-tidy-review`
ZedThree 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
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 |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Diagnostics: | ||
| MissingIncludes: Strict | ||
| ClangTidy: | ||
| FastCheckFilter: None | ||
| Includes: | ||
| IgnoreHeader: ["adios2/.*", "bits/.*", "cpptrace/.*", "petsc.*"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # This file requires prek rather than pre-commit | ||
| exclude: | ||
| glob: | ||
| - "tools/**/*.pro" | ||
| - "tools/**/*.m" | ||
| - "tools/**/*.[ch]" | ||
|
|
||
| # See https://pre-commit.com for more information | ||
| # See https://pre-commit.com/hooks.html for more hooks | ||
| repos: | ||
| - repo: builtin | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-added-large-files | ||
|
|
||
| # This would be nice to use, but it is a significant slowdown: | ||
|
|
||
| # # Sync versions of hook tools with `uv.lock` | ||
| # - repo: https://github.com/tsvikas/sync-with-uv | ||
| # rev: v0.5.0 | ||
| # hooks: | ||
| # - id: sync-with-uv | ||
|
|
||
| # C++ formatting | ||
| - repo: https://github.com/pre-commit/mirrors-clang-format | ||
| rev: v22.1.0 | ||
| hooks: | ||
| - id: clang-format | ||
| types_or: [c++, c, cuda] | ||
|
|
||
| # Python linting and formatting | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.5 | ||
| hooks: | ||
| # Run the linter. | ||
| - id: ruff-check | ||
| # Run the formatter. | ||
| - id: ruff-format | ||
|
|
||
| # CMake formatting | ||
| - repo: https://github.com/cheshirekow/cmake-format-precommit | ||
| rev: v0.6.13 | ||
| hooks: | ||
| - id: cmake-format | ||
| additional_dependencies: [pyyaml>=5.1] | ||
|
|
||
| # Various config files | ||
| - repo: https://github.com/python-jsonschema/check-jsonschema | ||
| rev: 0.37.0 | ||
| hooks: | ||
| - id: check-github-workflows | ||
| - id: check-readthedocs | ||
| - id: check-citation-file-format | ||
| - id: check-dependabot | ||
|
|
||
| # Docs linting | ||
| - repo: https://github.com/sphinx-contrib/sphinx-lint | ||
| rev: v1.0.2 | ||
| hooks: | ||
| - id: sphinx-lint | ||
| files: 'manual/sphinx/.*' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| clang-format~=22.0 | ||
| clang-tidy~=22.0 | ||
| cmakelang~=0.6 | ||
| pre-commit>=4.5.1 | ||
| ruff | ||
| sphinx-lint~=1.0 |
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.
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.
nextmay be an old, stale local branch. But then,originmay also be there own fork, which may also be outdated ...