cppcheck icon indicating copy to clipboard operation
cppcheck copied to clipboard

extracted code for actual check implementation from `Check` into `CheckImpl`

Open firewave opened this issue 2 years ago • 2 comments

Check is used to store the check instances which are being accessed. The code/interface for the actual implementation of a Check does not need to be exposed. This will also get rid of the ambiguity of the objects of the same type.

firewave avatar Aug 13 '23 19:08 firewave

@danmar Please have a look.

I just did it for a small check so the idea is more visible. The final change will unfortunately be quite monolithic as this cannot be done is smaller steps (at least not ones which will compile).

For the most checks it should be straightforward since they do not expose any public functions. We also need to adjust how we call the tests for some checks which can be done in a separate PR beforehand - that might be the changes which might cause the most problems.

FYI This will make several other cleanups I attempted in local branches and #4695 obsolete.

firewave avatar Aug 13 '23 20:08 firewave