Visitar URL original
#12232 ([meta] provide basic coverage for all error IDs) – Cppcheck

Opened 3 years ago

Last modified 18 months ago

#12232 new enhancement

[meta] provide basic coverage for all error IDs

Reported by: kidkat Owned by: noone
Priority: Normal Milestone:
Component: Other Version:
Keywords: Cc:

Description

Several errors we detect do not have a single unit test.

As a first step we should provide at least a single test which triggers the ID in question.

As a next step we should check the coverage output and provide tests to cover each reportError() invocation.

Change History (2)

comment:1 by kidkat, 3 years ago

Unfortunately the IDs are not contained in the output we are checking in the tests so a simple grep by using the IDs from the --errorlist output won't be possible to get a list of uncovered IDs.

comment:2 by kidkat, 20 months ago

​https://github.com/danmar/cppcheck/pull/7343 started adding the error IDs to the output.

​https://github.com/danmar/cppcheck/pull/7439 adds a script which outputs a list of IDs which lacks tests based on --errorlist.

WIP list of untested IDs:

signedCharArrayIndex - #13673
multiComparePatternError - #13729
iterators2 - #13856
nonStandardCharLiteral - #13857
nullPointerOutOfResources - #13858
toomanyconfigs - #13859
macroWithSemicolon - #13860
copyCtorAndEqOperator - #13862
purgedConfiguration - #13863
uninitDerivedMemberVarPrivate - #13864
redundantCopy - #13865
unusedLabelConfiguration - #13866
unusedLabelSwitchConfiguration - #13867
shiftTooManyBits - #13868
commaSeparatedReturn - #13869

Last edited 18 months ago by kidkat (previous) (diff)
Note: See TracTickets for help on using tickets.