Ticket #3515 (new enhancement)
|Reported by:||aggro80||Owned by:||noone|
Description (last modified by aggro80) (diff)
Add samples/id/good|bad.cpp for each error cppcheck detects.
Content of these files is valid C or C++ code. bad.cpp contains source which will provide error/warning in cppcheck. good.cpp contains the fixed version of the same code that gives no warnings.
- It can be used to test cppcheck and competitors
the error code if user requests
- We can probably automate a test to detect if some test is missing those files or if some files exist for test which has been removed, making maintenance easier.
- It can be the raw data to create
-- Online list of errors we detect (with sample codes)
-- Improve error messages e.g. in gui by providing sample code with
-- Anything else we might need in the future. E.g. with a small script we can probably generate a class from the files to provide the data to any program.
Note the current (but very small) list of ErrorMessages and sample codes.