-
Notifications
You must be signed in to change notification settings - Fork 395
Use a clang-tidy configuration file #488
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
Use a clang-tidy configuration file #488
Conversation
Works fine. I would also like to disable:
|
I can see file /home/runner/work/VulkanMemoryAllocator/VulkanMemoryAllocator/build/CMakeFiles/3.31.6/CompilerIdCXX/CMakeCXXCompilerId.cpp is still analyzed. |
In b5a5703 I changed it so it ignores the build directory. It should work now. |
It works, but I get the impression that it does not analyze the files of the sample app, only |
(I will have time to fix this sunday evening, need to go) |
Now we have a lot of warnings coming from analysis inside of Vulkan SDK, like "/home/runner/work/VulkanMemoryAllocator/VulkanMemoryAllocator/vulkan_sdk/1.4.309.0/x86_64/include/slang/slang-com-ptr.h" 😟 |
Why can't you test GitHub Actions on your fork? It seems to work for me. I created a fork on my GitHub account: |
Interesting 😄
I honestly don't know. I will try to get it to work first before pushing further commits. |
What you see in your fork there is the CI from the last merge. Since this account of you is not owner of VMA repository, it is not allowed to run the CI I think. If you would make a commit into the fork, I think GitHub won't permit you to run the CI in that fork. Since it's even with master branch, it just shows the last CI run from VMA repo's master branch. |
I still think it works. On my personal GitHub account I created a branch of my fork: |
Interesting. I will try to get it to work for my fork. |
Apologies for the force-push, but I think I have solved it now.Changes:
So please tell me which ones to add to the ignore list: 170 readability-braces-around-statements
120 misc-const-correctness
113 misc-static-assert
91 readability-implicit-bool-conversion
41 cppcoreguidelines-pro-type-cstyle-cast
22 cppcoreguidelines-owning-memory
17 readability-static-accessed-through-instance
17 bugprone-multi-level-implicit-pointer-conversion
17 bugprone-easily-swappable-parameters
16 misc-unused-parameters
12 performance-enum-size
12 misc-misplaced-const
12 misc-include-cleaner
12 cppcoreguidelines-special-member-functions
11 misc-non-private-member-variables-in-classes
11 cppcoreguidelines-pro-type-member-init
11 cppcoreguidelines-pro-bounds-array-to-pointer-decay
9 modernize-loop-convert
8 readability-const-return-type
7 cppcoreguidelines-pro-type-reinterpret-cast
7 cppcoreguidelines-pro-type-const-cast
6 cppcoreguidelines-init-variables
5 readability-simplify-boolean-expr
5 readability-duplicate-include
5 bugprone-macro-parentheses
4 performance-no-int-to-ptr
4 bugprone-sizeof-expression
3 misc-no-recursion
3 cppcoreguidelines-pro-type-vararg
2 readability-suspicious-call-argument
2 readability-qualified-auto
2 readability-else-after-return
1 readability-convert-member-functions-to-static
1 modernize-use-nullptr
1 cppcoreguidelines-no-malloc
1 cppcoreguidelines-avoid-const-or-ref-data-members
1 bugprone-switch-missing-default-case |
Thank you for getting back to this topic.
|
I added some more checks, and this is the list now 161 altera-struct-pack-align
113 google-readability-casting
112 altera-id-dependent-backward-branch
70 hicpp-signed-bitwise
41 cppcoreguidelines-pro-type-cstyle-cast
18 hicpp-use-auto
17 bugprone-multi-level-implicit-pointer-conversion
15 llvm-header-guard
12 misc-misplaced-const
12 misc-include-cleaner
11 misc-non-private-member-variables-in-classes
11 hicpp-no-array-decay
9 modernize-loop-convert
8 readability-const-return-type
6 cppcoreguidelines-init-variables
5 readability-duplicate-include
5 bugprone-macro-parentheses
4 performance-no-int-to-ptr
3 llvm-include-order
3 cert-err33-c
2 readability-suspicious-call-argument
1 readability-convert-member-functions-to-static
1 hicpp-no-malloc
1 fuchsia-statically-constructed-objects
1 cppcoreguidelines-avoid-const-or-ref-data-members
1 cert-err58-cpp
1 bugprone-switch-missing-default-case |
I think most of these are not helpful. I will just go back to using the list before and add your checks. I thouht we were missing some important checks by not having the |
Out of those new ones, I think cert-err33-c makes sense. |
I added those CERT C Secure Coding Standard Checks to clang-tidy. |
228110c
into
GPUOpen-LibrariesAndSDKs:master
Thank you very much for this contribution! |
Discussion: #484
This uses a
.clang-tidy
configuration file to specify which warnings to ignore and which files to analyze.Please check the result of the CI log before merging this, I can't test it in my fork.