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

[CodeStyle] trim trailing whitespace in .h, .cc, .cu, etc. #46006

Merged
merged 10 commits into from
Sep 15, 2022

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Sep 13, 2022

PR types

Others

PR changes

Others

Describe

移除 .h .cc .cu .cpp .cmake CMakeLists.txt 文件的 trailing whitespace(除 patches/ 目录下),cuh 由于 cpplint 问题,暂不改动

微调 C++ 相关 pre-commit hooks 的配置,使其在全量文件上运行也可以通过

@paddle-bot
Copy link

paddle-bot bot commented Sep 13, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Sep 13, 2022
Copy link
Member Author

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

这里是一些手动修复

其余都是自动修复(移除空格) + pre-commit 中的 clang-format 自动修复

本 PR 仅修改空格,无其余改动

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@SigureMo SigureMo force-pushed the trailing-whitespace-cpp-files branch from a71fac7 to 5ed27b0 Compare September 13, 2022 13:56
@SigureMo SigureMo changed the title [CodeStyle] trim trailing whitespace in .h .cc .cu .cuh ... [CodeStyle] trim trailing whitespace in .h, .cc, .cu, .cuh, etc. Sep 13, 2022
@luotao1
Copy link
Contributor

luotao1 commented Sep 14, 2022

  1. 建议PR的内容尽量独立,便于不同的审核人review
    • 这个PR只完成移除 .h .cc .cu .cuh .cpp .cmake CMakeLists.txt 文件的 trailing whitespace(除 patches/ 目录下)
  2. 微调 C++ 相关 pre-commit hooks 的配置,使其在全量文件上运行也可以通过
    • 因为cpplint会修改部分宏定义,建议把copyright_checker和clang-format提一个PR,cpplint单独提一个修复PR

@SigureMo
Copy link
Member Author

这个PR只完成移除 .h .cc .cu .cuh .cpp .cmake CMakeLists.txt 文件的 trailing whitespace(除 patches/ 目录下)

本 PR 已 revert 了其余修改,其余修改将在后续 PR 中逐步完成

@SigureMo SigureMo changed the title [CodeStyle] trim trailing whitespace in .h, .cc, .cu, .cuh, etc. [CodeStyle] trim trailing whitespace in .h, .cc, .cu, etc. Sep 14, 2022
Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 self-assigned this Sep 14, 2022
@luotao1 luotao1 requested a review from Ligoml September 14, 2022 09:45
@SigureMo
Copy link
Member Author

本 PR merge 后可考虑 merge #46067 (向 hook 添加 Doc 和 C++ 相关的后缀)

@luotao1 luotao1 merged commit 8dde7ae into PaddlePaddle:develop Sep 15, 2022
@SigureMo SigureMo deleted the trailing-whitespace-cpp-files branch September 15, 2022 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants