Fixed usage of hasSideEffectsRecursive which was causes crashes
of rules 12.4 and 13.1.
Add more tests for these rules.
See trac ticket: https://trac.cppcheck.net/ticket/9487
Add some more tests for rule 10.1. They are given as examples in the
MISRA document. The 10.1 test that causes a false positive for 10.6 can be
found under the 10.6 tests.
Track ticket for false positive:
https://trac.cppcheck.net/ticket/9488
Trac ticket for the false negative:
https://trac.cppcheck.net/ticket/9489
The unused argument causes the new check for rule 2.7 to output an error
here.
I verified that the regression test still works without the unused
argument (misra.py would still crash).
Travis should be happy again.
* Add check for MISRA-C 2012 Rule 2.7 and test cases.
* Cast unused function parameters of some test patterns to "void".
* Fix function parameter void cast in "misra_17_6". Add comment to "misra_11_7_extra" to make all function parameter void casts look alike.
Rule 21.1 now doesn't report errors on usage of library functions
started from underscore (e.g. `_exit') and valid errno assignment.
See added tests for examples.
Fix R16.3 state machine which doesn't report errors in last case/default
statemenet. See added tests for examples.
Issue on trac: https://trac.cppcheck.net/ticket/8548
Version 1.88 changed the parsing of the MISRA rules file adding a
severity setting. This caused a regression in rule parsing.
In particular the following format used to parse cleanly and produce
rule output that would show the severity as part of the rule text.
Rule 1.2
Advisory
Rule text goes here.
Rule 1.3
Required
More rule text goes here.
As of 1.88 a file structured like above would parse as having no rules.
The problem is the use of blank lines as a rule delimiter. The
modified rule parser wants to see a rules formatted like below:
Rule 3.1 Required
R3.1 text.
Rule 4.1 Required
R4.1 text.
or:
Rule 1.1
Add this rule and parse to next, skipping empty lines.
Rule 1.2
Rule text.
Any rule text that did not fall into one of the above formats would
result in incomplete rule text parsing.
Change the parsing of the rule text file so that blank lines are ignored
instead of treating them as a delimiter between rules. Instead use the
start of the next rule as a delimiter for the end of the previous rule.
This allows both of the newer formats but also supports the behavior of
pre-1.88 versions.
Change units tests that were specifically forbidding the use of blank
lines to ones that allow blank lines.
* Update addons structure. Make Y2038 addon works.
All addons are now located in same directory, where cppcheck-gui is
looking for them.
Y2038 addon has been updated to latest cppcheck version. Output is same
as 303622f01c commit as it described in
README: 303622f01c/addons/y2038/README.
* Clean up .travis.yml
* Update travis.yml paths.
* misra.py: Bring back -P argument for backward compatibility
* Fix paths
* Normalize dumpfile paths tpo cppcheck format
* Fixup 3 test.
* Add arguments regression test.
* Fixing travis build