Repository navigation
[CodeStyle] trailing whitespace hook for .hook and .yaml #46081
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
luotao1
merged 8 commits into
PaddlePaddle:develop
from
cattidea:trailing-whitespace-increment
Sep 19, 2022
+5
−1
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a3f4717
adjust pre-commit config
SigureMo 10235b2
Merge branch 'develop' into trailing-whitespace-increment
SigureMo 2d1e065
incremental trailing whitespace
SigureMo b2c7ac4
revert python increment, fix in #46080
SigureMo 818a8e5
add .yaml and .hook suffix to pre-commit config, test=document_fix
SigureMo 25a3b0d
Merge branch 'develop' into trailing-whitespace-increment
SigureMo bb527d2
Merge branch 'develop' into trailing-whitespace-increment
SigureMo cc3e114
add yml suffix
SigureMo 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 |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| exclude: | | ||
| (?x)^( | ||
| patches/.+ | ||
| )$ | ||
| repos: | ||
| - repo: https://github.com/Lucas-C/pre-commit-hooks.git | ||
| rev: v1.1.14 | ||
|
|
@@ -26,7 +30,7 @@ repos: | |
| - id: sort-simple-yaml | ||
| files: (api|backward|api_[a-z_]+)\.yaml$ | ||
| - id: trailing-whitespace | ||
| files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists.txt)$ | ||
| files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$ | ||
|
Collaborator
Author
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. 增加了 yml 后缀的 yaml 文件,为 GitHub issue form 模板,trailing whitespace 不会影响渲染效果,存量也在相应 PR 修复 |
||
| - repo: local | ||
| hooks: | ||
| - id: clang-format | ||
|
|
||
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.
直接全局排除掉这些文件,避免每个 hook 下都写一遍
参考:.pre-commit-config.yaml - top level