Open GreatV opened 1 year ago
认领 1. 存量修复相关
32 - 42
认领26
建议先把非CINN目录的代码格式修复完+CI监控上,再考虑CINN目录。原因如下: @GreatV @zhangbo9674
@GreatV @ccsuzzh :
@luotao1 好的,收到。
认领6
@zrr1999 @RedContritio @gouzil 任务表格更新了一下,有些任务已经没有了,麻烦重新领取一下任务。
@BeingGod 我重新扫描了一下,发现 modernize-make-unique
还有一些没有处理的,麻烦再处理一下。
@GreatV 好的
认领 13,16
认领46
认领8
认领 53-55,57-60
认领38-44
认领 53-55,57-60
@GreatV @luotao1 编号55这个相关修改在pb.cc的两个生成文件中,是不是不用修改了?
认领 53-55,57-60
@GreatV @luotao1 编号55这个相关修改在pb.cc的两个生成文件中,是不是不用修改了?
生成的文件不修改, 直接放开检查就行
一、 项目说明
用于跟踪 clang-tidy代码风格检查工具的引入 并记录该计划下各个子任务的计划和进度。
二、 主要工作
📓 操作指南
(以
readability-container-size-empty
为例)-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
.clang-tidy
中移除-readability-container-size-empty
的前缀-
clang-tidy
,并根据clang-tidy
提示修改代码也可以直接运行clang-tidy并行检查工具:
整体进展 (39/94)
1. 存量修复相关
旧任务表格如下所示(旧任务进展 55/94):按完成时间顺序,排名不分先后: @GreatV (4) @BeingGod (4) @gouzil (19) @ccsuzzh (5) @enkilee (13) @xiaoyewww (6) @SigureMo (3) @RedContritio (1)
编号 | 错误类型 | 错误数量 | 认领人 | PR链接 :------ | :------ | :------ | :------ | :------ 1 | [hicpp-avoid-goto] | 1603 2 | [cppcoreguidelines-avoid-goto] (🏷️ alias of task 1) | 1603 3✅ (2023/7/31) | [modernize-redundant-void-arg] | 1326 | @gouzil | #55652 #55741 4✅ (2023/8/3) | [modernize-loop-convert] | 1091 | @GreatV | #55704 5✅ (2023/8/30) | [modernize-make-shared] | 842 | @SigureMo | #55807 6✅ (2023/8/14) | [modernize-avoid-c-arrays] | 820 | @gouzil | #55774✅ #55954✅ 7✅ (2023/8/14) | [cppcoreguidelines-avoid-c-arrays] (🏷️ alias of task 6) | 820 | @gouzil | #55774✅ #56208✅ 8✅ (2023/9/15) | [cppcoreguidelines-narrowing-conversions] | 596 | @gouzil | #56218 ✅ #56895✅ #56904✅ 57114✅ 9✅ (2023/10/11) | [bugprone-narrowing-conversions] (🏷️ alias of task 8) | 596 | @gouzil | #57861 10✅ (2023/10/11) | [cppcoreguidelines-init-variables] | 576| @gouzil | #57871 11 ✅ (2023/7/11) | [readability-container-size-empty] | 458 | @GreatV | #55279 12✅ (2023/8/4) | [modernize-use-nullptr] | 409 | @ccsuzzh | #55800 13✅ (2023/8/4) | [modernize-use-emplace] | 401 | @BeingGod | #55799 14 | [performance-unnecessary-copy-initialization] | 395 15 | [cppcoreguidelines-pro-type-const-cast] | 164 | @enkilee | #58285 16✅ (2023/8/7) | [modernize-use-equals-default] | 150 | @BeingGod | #55983 17✅ (2023/10/12) | [performance-for-range-copy] | 127 | @enkilee | #57809 18 | [cppcoreguidelines-pro-type-member-init] | 127 19✅ (2023/10/13) | [performance-move-const-arg] | 113 | @enkilee | #57627 20✅ (2023/9/7) | [clang-analyzer-core.CallAndMessage] | 96 | @enkilee | #56954 21 | [modernize-pass-by-value] | 95 | @Rruown 22✅ (2023/8/9) | [modernize-make-unique] | 81 | @BeingGod | #55506✅ #55764✅ 23✅ (2023/9/21) | [bugprone-branch-clone] | 74 | @enkilee | #57522 24 | [performance-inefficient-vector-operation] | 71 | @gouzil | #58028 ✅ 25✅ (2023/9/7) | [modernize-deprecated-headers] | 34 | @enkilee | #56994 26✅ (2023/8/29) | [misc-unused-using-decls] | 33 | @enkilee | #56485 27✅ (2023/8/29) | [misc-unused-alias-decls] | 32 | @enkilee | #56485 28 | [clang-analyzer-core.NullDereference] | 32 29✅ (2023/9/18) | [cppcoreguidelines-no-malloc] | 29 | @gouzil | #57343 30 | [clang-analyzer-optin.cplusplus.VirtualCall] | 26 31✅ (2023/8/14) | [modernize-use-bool-literals] | 22 | @enkilee | #56216 32✅ (2023/9/20) | [clang-analyzer-deadcode.DeadStores] | 22 | @enkilee | #57483 33✅ (2023/9/7) | [bugprone-signed-char-misuse] | 21 | @ccsuzzh | #56744 34✅ (2023/9/1) | [performance-noexcept-move-constructor] | 18 | @enkilee | #56261 35✅ (2023/9/1) | [bugprone-incorrect-roundings] | 18| @gouzil | #56747 36✅ (2023/9/1) | [modernize-use-transparent-functors] | 17| @enkilee | #56261 37✅ (2023/8/15) | [performance-faster-string-find] | 14 | @enkilee | #56255 38✅ (2023/8/28) | [bugprone-exception-escape] | 14| @gouzil | #56692 39✅ (2023/8/30) | [clang-analyzer-optin.cplusplus.UninitializedObject] | 13| @gouzil | #56648 40✅ (2023/8/29) | [performance-inefficient-string-concatenation] | 12| @gouzil | #56647 41✅ (2023/8/29) | [bugprone-unhandled-self-assignment] | 9| @gouzil | #56640 42✅ (2023/8/29) | [clang-analyzer-core.uninitialized.Assign] | 8| @gouzil | #56637 43✅ (2023/8/29) | [clang-analyzer-core.UndefinedBinaryOperatorResult] | 8| @gouzil | #56636 44✅ (2023/8/29) | [bugprone-misplaced-widening-cast] | 8| @gouzil | #56635 45✅ (2023/8/1) | [bugprone-unused-raii] | 7 | @ccsuzzh | #55815 46✅ (2023/8/3) | [modernize-avoid-bind] | 6 | @gouzil 47 ✅ (2023/7/21) | [modernize-use-override] | 4 | @BeingGod | #55491 48✅(2023/11/6) | [clang-analyzer-unix.Malloc] | 4 | @RedContritio| #55658 49 | [clang-analyzer-cplusplus.NewDeleteLeaks] | 4 | 50 | [clang-analyzer-core.DivideZero] | 4 | 51✅ (2023/8/14) | [bugprone-copy-constructor-init] | 4 | @enkilee | #56219 52✅ (2023/8/14) | [bugprone-argument-comment] | 4 | @enkilee | #56217 53✅ (2023/8/29) | [cppcoreguidelines-c-copy-assignment-signature] | 3 | @xiaoyewww | #56601 54✅ (2023/8/29) | [bugprone-use-after-move] | 3| @xiaoyewww | #56601 55 | [bugprone-sizeof-expression] | 3| @xiaoyewww 56✅ (2023/8/29) | [modernize-raw-string-literal] | 2 | @SigureMo | #55675 | 57✅ (2023/9/5) | [cppcoreguidelines-explicit-virtual-functions] | 2| @xiaoyewww | #56649 58✅ (2023/9/5) | [clang-analyzer-core.NonNullParamChecker] | 2| @xiaoyewww | #56649 59✅ (2023/9/5) | [bugprone-unused-return-value] | 2| @xiaoyewww | #56676 60✅ (2023/9/5) | [bugprone-suspicious-missing-comma] | 2| @xiaoyewww | #56676 61✅ (2023/8/29) | [hicpp-exception-baseclass] | 1 | @SigureMo | #55847 | 62✅ (2023/8/15) | [clang-analyzer-unix.Vfork] | 1 | @gouzil | #56253 63✅ (2023/8/15) | [clang-analyzer-security.insecureAPI.vfork] | 1 | @gouzil | #56253 64✅ (2023/9/7) | [clang-analyzer-optin.portability.UnixAPI] | 1| @ccsuzzh | #56744 65✅ (2023/8/28) | [clang-analyzer-cplusplus.InnerPointer] | 1 | @ccsuzzh | #56693 66✅ (2023/8/14) | [bugprone-integer-division] | 1 | @gouzil | #562462. 增量拦截相关
.pre-commit-config.yaml
在添加clang-tidy
检查项clang-tidy
,开发者便于手动执行检查tools/codestyle/clang-tidy.py
即可clang-tidy
工具同步到release分支clang-tidy
同步到CI镜像中,PR-CI-Build
中打开CI, 避免重复安装下载3. 移除pre-commit中的
-WnoXXX
(.pre-commit-config.yaml)paddle/cinn
重新加入 clang-tidy pre-commit 扫描路径,并确保打开的检查项能够通过