-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[CI] Added feature to filter out files to file_check.py that do not require cppcheck #7499
[CI] Added feature to filter out files to file_check.py that do not require cppcheck #7499
Conversation
5d2a179
to
d5ca69a
Compare
f769343
to
5bd39d8
Compare
5bd39d8
to
d931fbe
Compare
@supperthomas 忘记打stderr了,已经改好了 |
03844e4
to
46e5a1f
Compare
46e5a1f
to
4a6bc13
Compare
tools/ci/cpp_check.py
Outdated
# | ||
# Change Logs: | ||
# Date Author Notes | ||
# 2021-04-01 LiuKang the first version |
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.
注释改下。
tools/ci/cpp_check.py
Outdated
@click.argument( | ||
'repo', | ||
nargs=1, | ||
type=click.STRING, |
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.
去掉
- master | ||
on: [push] | ||
# pull_request: | ||
# branches: |
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.
去掉
tools/ci/file_check.py
Outdated
@@ -1,5 +1,5 @@ | |||
# | |||
# Copyright (c) 2006-2022, RT-Thread Development Team | |||
# Copyright (c) 2006-2023, RT-Thread Development Team |
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.
这个文件不用改
02044f3
to
86eb2f1
Compare
86eb2f1
to
5adfde1
Compare
@supperthomas 涛哥,这个PR你认为没啥问题之后可以直接合并掉 |
感谢PR。 |
拉取/合并请求描述:(PR description)
添加了根据ignore_format.yml的ignore_files属性过滤掉不需要cppcheck的文件。
为什么提交这份PR (why to submit this PR)
#7458
你的解决方案是什么 (what is your solution)
根据file_check.py中原先过滤出的new_file,再次过滤出C/C++文件,筛选之后再进行cppcheck。
#7497 的另一种方法,这个方法可以提高代码复用性,静态代码分析也属于file check,所以功能上也合理。所以这个版本应该会更好一点。
在什么测试环境下测试通过 (what is the test environment)
fork后repo中的github action测试通过。
修改cppcheck会出现错误的文件:
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up