Skip to content
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 exclude rules of pre-commit for paddle/utils and third_party #34880

Merged

Conversation

MingMingShangTian
Copy link
Contributor

PR types

Others

PR changes

Others

Describe

Add exclude rules for paddle/utils and paddle/fluid/distributed/thirdparty.
The files in paddle/utils and paddle/fluid/distributed/thirdparty do not need to execute the pre-commit check.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@tianshuo78520a
Copy link
Contributor

LGTM

@@ -26,6 +26,10 @@ repos:
entry: bash ./tools/codestyle/clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|proto)$
exclude: |
Copy link
Contributor

@chenwhql chenwhql Aug 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将来会不会有可能在utils目录下我们自己实现一些工具,这个时候,我们可能是需要代码格式检查的,这里有没有方法仅跳过对于license的检查?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这种情况的话,需要将豁免的文件名添加到exclude下,而不是像现在这样用.* 匹配

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,建议尽快上线对utils目录的CI监控

@MingMingShangTian MingMingShangTian merged commit 7b3295a into PaddlePaddle:develop Aug 17, 2021
@MingMingShangTian MingMingShangTian deleted the pre_commit_exclude branch August 17, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants