Closed utopalex closed 8 years ago
Using gerrit-check, I get frequent false positives about struct members being unused, even though they are clearly being used in .cpp implementation files, and checking those files directly will not find an issue. It turns out that the way check.py includes header files for passing to cppcheck is wrong. In fact this is confirmed on http://stackoverflow.com/questions/36825903/cppcheck-claims-that-a-field-is-not-used-while-it-is-in-another-file
Header files should not be explicitly checked, but are implicitly checked. Therefore check.py, line 28 should be changed to not include .h and .hpp files.
Therefore check.py, line 28 should be changed to not include .h and .hpp files.
Doing that would also affect other tools than just cppcheck, so I've implemented this slightly differently in PR #3 .
Using gerrit-check, I get frequent false positives about struct members being unused, even though they are clearly being used in .cpp implementation files, and checking those files directly will not find an issue. It turns out that the way check.py includes header files for passing to cppcheck is wrong. In fact this is confirmed on http://stackoverflow.com/questions/36825903/cppcheck-claims-that-a-field-is-not-used-while-it-is-in-another-file
Header files should not be explicitly checked, but are implicitly checked. Therefore check.py, line 28 should be changed to not include .h and .hpp files.