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

[clang-tidy] enable readability-container-size-empty check #55279

Merged
merged 5 commits into from
Jul 12, 2023
Merged

[clang-tidy] enable readability-container-size-empty check #55279

merged 5 commits into from
Jul 12, 2023

Conversation

GreatV
Copy link
Contributor

@GreatV GreatV commented Jul 10, 2023

PR types

Others

PR changes

Others

Description

📓 操作指南🥇

  1. 打开检查
    .clang-tidy中移除-readability-container-size-empty的前缀-
  2. 运行clang-tidy,并根据clang-tidy提示修改代码
  3. 重新运行pre-commit确认修改完成
# paddle on develop [!+?] via △ v3.18.0 via 🐍 v3.7.16 took 27m16s
pre-commit run clang-tidy --all-files > clang-tidy.log 2>&1
grep "\[readability-container-size-empty,-warnings-as-errors\]" clang-tidy.log

Installation clang-tidy

Linux

apt install llvm

MacOS

brew install llvm

Windows

choco install llvm

@paddle-bot
Copy link

paddle-bot bot commented Jul 10, 2023

你的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.

Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangbo9674
Copy link
Contributor

这里记录一个 TODO:cinn目录开启检查

@luotao1
Copy link
Contributor

luotao1 commented Jul 11, 2023

TODO2:PR-CI-Codestyle-Check中打开检查:pre-commit run clang-tidy --diff-files > clang-tidy.log 2>&1 然后grep看log是不是空的,全量扫27分钟,增量应该快一点

@GreatV
Copy link
Contributor Author

GreatV commented Jul 11, 2023

PR-CI-Coverage 不通过(覆盖率80%低于要求的90%),可能是修改的文件过多,某些文件之前对应的覆盖率就不足。

@luotao1 luotao1 merged commit be3a6fa into PaddlePaddle:develop Jul 12, 2023
cqulilujia pushed a commit to cqulilujia/Paddle that referenced this pull request Jul 24, 2023
…addle#55279)

* [clang-tidy] enable readability-container-size-empty check

* fix test_custom_kernel Failed

* add clang-tid-10 in dockerfile

* add clang-tidy in dockerfile

* fix bug
@GreatV GreatV deleted the clang-tidy_enable_check_readability-container-size-empty branch July 31, 2023 01:08
wz1qqx pushed a commit to wz1qqx/Paddle that referenced this pull request Jul 31, 2023
…addle#55279)

* [clang-tidy] enable readability-container-size-empty check

* fix test_custom_kernel Failed

* add clang-tid-10 in dockerfile

* add clang-tidy in dockerfile

* fix bug
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.

3 participants