Hello,
we are using cppcheck on a larger software project.
The last days /weeks we recognized that every run of cppcheck takes about the same large amount of time, even though we are using --cppcheck-build-dir.
We run cppcheck in the gitlab-CI from a powershell script.
In the .a1-files I see that the hashes change every time.
So in cppchecks std::size_t Preprocessor::calculateHash-function I collected the hashData string.
In that string I can see that the suppression section changes.
The first suppressions in that section shows the suppressions specified via --suppressions-list=fileName.
This part does not change.
The last part of the suppression section in hash string shows some inline suppressions from our source code.
This part changes. It seems that it contains the inline suppressions of our source code, but also from other source files than the one analyed just now. So this section changes everytime cppcheck runs on our source code.
What might be the problem?
As a further test I commented our the line:
//supprs.nomsg.dump(toolinfo); in function static std::size_t calculateHash, so that the suppresions are not included in text toolinfo.
That way the calculation of the hash calculates the same way on consecutive runs on unchanged files.
Thanksforhelp,
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
we are using cppcheck on a larger software project.
The last days /weeks we recognized that every run of cppcheck takes about the same large amount of time, even though we are using --cppcheck-build-dir.
We run cppcheck in the gitlab-CI from a powershell script.
In the .a1-files I see that the hashes change every time.
So in cppchecks std::size_t Preprocessor::calculateHash-function I collected the hashData string.
In that string I can see that the suppression section changes.
The first suppressions in that section shows the suppressions specified via --suppressions-list=fileName.
This part does not change.
The last part of the suppression section in hash string shows some inline suppressions from our source code.
This part changes. It seems that it contains the inline suppressions of our source code, but also from other source files than the one analyed just now. So this section changes everytime cppcheck runs on our source code.
What might be the problem?
As a further test I commented our the line:
//supprs.nomsg.dump(toolinfo); in function static std::size_t calculateHash, so that the suppresions are not included in text toolinfo.
That way the calculation of the hash calculates the same way on consecutive runs on unchanged files.