-
Notifications
You must be signed in to change notification settings - Fork 5
Support pre-commit and apply changes
#20
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
Open
knoepfel
wants to merge
1
commit into
main
Choose a base branch
from
enable-pre-commit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # gersemi is an opinionated formatter and does not support the same | ||
| # level of configuration as cmake-format. The previous settings from | ||
| # .cmake-format.json (dangle_align and dangle_parens) are not | ||
| # supported and have no direct equivalents. | ||
|
|
||
| definitions: [] | ||
| disable_formatting: false | ||
| extensions: [] | ||
| indent: 2 | ||
| line_length: 99 | ||
| list_expansion: favour-inlining | ||
| unsafe: false | ||
| warn_about_unknown_commands: 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| MD013: | ||
| code_blocks: 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # See https://pre-commit.com for more information | ||
| # See https://pre-commit.com/hooks.html for more hooks | ||
|
|
||
| # Everything in copied_from_larsoft_minor_edits is copied from larsoft and should not be modified. | ||
| # It is excluded from pre-commit checks to avoid unnecessary noise. | ||
| exclude: ^migration/gauss_hit_finder/copied_from_larsoft_minor_edits/ | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-yaml | ||
| - id: check-toml | ||
| - id: check-merge-conflict | ||
| - id: check-vcs-permalinks | ||
| - id: check-executables-have-shebangs | ||
| - id: mixed-line-ending | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.19 | ||
| hooks: | ||
| - id: ruff-format | ||
| types_or: [python, pyi] | ||
| - id: ruff | ||
| types_or: [python, pyi] | ||
| - repo: https://github.com/pre-commit/mirrors-clang-format | ||
| rev: v20.1.8 | ||
| hooks: | ||
| - id: clang-format | ||
| types_or: [c++, c, cuda] | ||
| - repo: local | ||
| hooks: | ||
| - id: fix-header-guards | ||
| name: fix C++ header guards | ||
| entry: python3 scripts/fix_header_guards.py | ||
| language: system | ||
| files: \.(h|hpp)$ | ||
| - repo: https://github.com/BlankSpruce/gersemi-pre-commit | ||
| rev: 0.27.7 | ||
| hooks: | ||
| - id: gersemi | ||
| - repo: https://github.com/google/go-jsonnet | ||
| rev: v0.22.0 | ||
| hooks: | ||
| - id: jsonnet-format | ||
| - id: jsonnet-lint | ||
| # The files in test/max-parallelism import files that are generated during the build. | ||
| # We therefore exclude them from linting, but still format them. | ||
| exclude: ^test/max-parallelism | ||
| - repo: https://github.com/rbubley/mirrors-prettier | ||
| rev: v3.8.4 | ||
| hooks: | ||
| - id: prettier | ||
| types_or: [yaml] | ||
| - repo: https://github.com/DavidAnson/markdownlint-cli2 | ||
| rev: v0.22.1 | ||
| hooks: | ||
| - id: markdownlint-cli2 | ||
| args: [--fix] |
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Framework-R-D/phlex-examples
Length of output: 257
🏁 Script executed:
Repository: Framework-R-D/phlex-examples
Length of output: 542
🏁 Script executed:
Repository: Framework-R-D/phlex-examples
Length of output: 261
🏁 Script executed:
Repository: Framework-R-D/phlex-examples
Length of output: 973
🌐 Web query:
markdownlint MD013 code_blocks deprecated ignore_code_blocks markdownlint-cli2 v0.22.1💡 Result:
The parameter code_blocks for rule MD013 has been deprecated in favor of ignore_code_blocks [1][2][3]. To align with consistent naming conventions across markdownlint rules, ignore_code_blocks was introduced as a more descriptive alternative [4][5]. When using the deprecated code_blocks parameter (specifically if set to false), the tool will output a deprecation warning advising you to replace it with ignore_code_blocks: true [1][2][3]. If you are using markdownlint-cli2 v0.22.1, it inherits this behavior because it relies on the underlying markdownlint library where these changes were implemented [6][7]. To update your configuration, change your MD013 settings as follows: Deprecated: "MD013": { "code_blocks": false } Recommended: "MD013": { "ignore_code_blocks": true } [1][2][3]
Citations:
ignore_code_blocksparameter to MD013 markdownlint/markdownlint#404Use
ignore_code_blocksfor MD013code_blocksis the deprecated form here; switch to the replacement to avoid noisy lint warnings going forward.Suggested change
📝 Committable suggestion
🤖 Prompt for AI Agents