I am using CPPCheck with the Visual Studio plugin. In the settings menu for it there is a an option ‘Edit Global Suppressions’. What I would like to do is use the option ‘File excluded from check (C# regex)’ to stop CPPCheck from looking through a large single-file header-only test framework file I am using called Catch. When I run ‘check current project with cppcheck’ I have to wade through a large number of messages from code I didn’t write, nor am interested in fixing.
I am not good with regex but I have tried a lot of combinations to get it to ignore this file without success. Is there an obvious regex statement I haven’t come across or is this feature not working. I didn’t see an issue in the VS plugin repo so I’m willing to bet its just me.
P.S. The file is stored in the usual place for a Visual Studio C++ project:
D:\Libraries\Documents\Visual Studio 2015\Projects\ReliableControls\ReliableControls\catch.hpp.
Here is a short list of entries I’ve tried… that I can remember. (ReliableControls is the name of the project).
- ^ReliableControls\catch.hpp$
- ^ReliableControls\catch\.hpp$
- ^catch.hpp$
- ^catch\.hpp$
Here is the list of the defaults in the exclude file window. I’ve tried following similar patterns.
- ^moc_.*\.cpp$
- ^qrc_.*\.cpp$
- ^ui_.*\.h$
