-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fixed #14000 - deprecated the usage of rules #7657
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
base: main
Are you sure you want to change the base?
Conversation
#ifdef _MSC_VER | ||
#pragma message("The usage of rules is deprecated and will be removed in a future Cppcheck version. Please use addons instead.") | ||
#endif |
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.
This is for the case when you compile it through the provided Visual Studio project which utilized neither CMake nor make.
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.
hmm.. personally I really like to remove the rules feature. However I've wanted to get rid of rules for many years but when I have asked around there was always some users that strongly wanted to keep them..
It seems people don't want to touch any python code.
In theory we could add an addon that more or less simulates the cppcheck rules functionality. It can load the rules files and run the provided regular expressions.. I don't envision that it can be 100% compliant but it can provide similar functionality.
@pfultz2 @orbitcowboy as far as I remember you have used rules.. |
We do use some rules here: https://github.com/pfultz2/cppcheck-rules/blob/master/rules/UseStlAlgorithm/rule.xml Its not really straightforward to translate those to addons. |
This would be slower, but not just because of the regex in python. The slowest part of the addon is loading the xml files, unfortunately. It would be nice if we saved to protobuf(or something similiar) as it can build bindings in many different languages, and the loading would be much quicker. |
I agree. It is possible that Cppcheck Solutions can look into this someday but it is not very high on the prio list right now unfortunately. |
No description provided.