After clang-tidy been enabled in the project file.
<tools><tool>clang-tidy</tool></tools>
run the check, got many unwanted warnings, the .clang-tidy configuration file been ignored.
I think Cppcheck should honor .clang-tidy configuration file if it found (maybe allow user to set the location of the file, and read it in), instead of passing all check options on command line, which override the options in configuration file.
It sounds like the configuration should not say <leak-ignore>. I'll remove it. If you see any other problems related to "windows sdk" you can check if the windows.cfg has proper configuration for the functions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Daniel,
I was trying to use a .clang-tidy file to configure the analysis, but it appears to not work. I'm not sure if my setup is correct, that's why I want to confirm whether the feateure was implemented at all or whether it is still an open request.
Would be great to have this option available.
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After clang-tidy been enabled in the project file.
run the check, got many unwanted warnings, the .clang-tidy configuration file been ignored.
I think Cppcheck should honor .clang-tidy configuration file if it found (maybe allow user to set the location of the file, and read it in), instead of passing all check options on command line, which override the options in configuration file.
The file is YAML.
https://clang.llvm.org/extra/clang-tidy/index.html
Good idea!
Hi Daniel, any suggestion on
SetClipboardData()
https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setclipboarddata
Currently cppcheck reports memory leak for code using it, I think it can be treated as free-like function.
The
SetClipboardData()
is configured here:https://github.com/danmar/cppcheck/blob/1.87/cfg/windows.cfg#L3068
It sounds like the configuration should not say
<leak-ignore>
. I'll remove it. If you see any other problems related to "windows sdk" you can check if the windows.cfg has proper configuration for the functions.Thanks.
Hi Daniel,
I was trying to use a .clang-tidy file to configure the analysis, but it appears to not work. I'm not sure if my setup is correct, that's why I want to confirm whether the feateure was implemented at all or whether it is still an open request.
Would be great to have this option available.
thanks
The ticket that we created in trac: https://trac.cppcheck.net/ticket/9190
If anybody would have time to fix that please feel free to do it.