Commit Graph

411 Commits

Author SHA1 Message Date
Richard A. Smith a26d73f78f Fix false positive in misra.py rule 20.14 (#1240)
MISRA rule 20.14 is not limited to #if pragmas and also extends to
positives whenever #ifdef/#ifndef is used.
2018-05-20 08:31:59 +02:00
Swasti Shrivastava 248e2ef2f8 Modified rule 7.3 (#1232) 2018-05-16 12:04:02 +02:00
Swasti Shrivastava 92fd7d9343 Modified rule 5.1 along with test suite (#1231)
* Modified rule 5.1 along with test suite

* Modified variable name in misra-test.c

* Modified rule 5.1 along with test suite

* Changed variable name
2018-05-16 11:07:44 +02:00
Swasti Shrivastava bb7ffd123d Modified rule 8.12 (#1233) 2018-05-15 13:18:55 +02:00
Matthias Krüger 4c8bb9ac6f fix a few typos 2018-05-14 13:11:59 +02:00
Swasti Shrivastava 4b873ed573 Rule 5.3 modified along with test suite (#1227)
* Added rule 5.2

* updated 5.2

request-checks: true

* Added rule 5.3

* Changed rule 5.4, 5.5

* Updated test suite for Rule 5.2

* Changes in Rule 5.4 and 5.5

* Change in function name in test suite and removed type from class token in cppcheck

* Changed the name of function in misra-test.c

* Modified rule 5.3

* Modified misra-test.c for rule 5.3
2018-05-14 13:09:38 +02:00
swasti16 4956b89506 Changes in misra c rule 5.4 and 5.5 (#1219)
* Added rule 5.2

* updated 5.2

request-checks: true

* Added rule 5.3

* Changed rule 5.4, 5.5

* Updated test suite for Rule 5.2

* Changes in Rule 5.4 and 5.5

* Change in function name in test suite and removed type from class token in cppcheck

* Changed the name of function in misra-test.c
2018-05-11 14:57:08 +02:00
orbitcowboy c39e3467a4 misra.py: Rule 21.8, added missing exit() function. 2018-05-09 16:48:49 +02:00
orbitcowboy bcae3ce9d4 misra.py: State that Cppcheck already covers rule 22.4 with error-id: 'writeReadOnlyFile'. 2018-05-09 13:51:14 +02:00
swasti16 d934065d21 Added rule 5.2 (#1212)
* Added rule 5.2

* updated 5.2

request-checks: true

* Updated test suite for Rule 5.2
2018-05-08 20:41:45 +02:00
Markus Elfring 58ebc64b2f Using compiled regular expressions for MISRA check functions (#1208)
​The method “match” was used as a module-level function in ​for loops
of implementations for MISRA check functions so far.
Use ​compiled regular expression objects instead.
Link: https://trac.cppcheck.net/ticket/8547
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2018-05-07 22:19:39 +02:00
Daniel Marjamäki 286e300c6f misra: fix test assertion 2018-05-04 22:30:24 +02:00
Daniel Marjamäki 904e9149bf misra: fix 16.3 false negative for conditional break 2018-05-04 22:27:45 +02:00
Daniel Marjamäki 8be593db8f misra: fixed false negatives 2018-05-04 22:18:22 +02:00
Daniel Marjamäki 53e3217254 misra: updated 20.14 2018-05-04 06:37:02 +02:00
Daniel Marjamäki 8b42706158 misra: Added check for rule 20.13 2018-05-03 22:53:06 +02:00
Daniel Marjamäki 274d56d0aa misra: Added 20.14 rule 2018-05-03 22:41:12 +02:00
Daniel Marjamäki 493e243c0b misra: fix fp in 16.6 2018-05-03 10:59:09 +02:00
Daniel Marjamäki 2a9ee563c2 misra: avoid fp for essentially boolean conditions when bitfield member is used 2018-05-02 20:56:03 +02:00
Daniel Marjamäki fce7a0a128 dump: add Function::type 2018-04-30 16:52:51 +02:00
Daniel Marjamäki 2f18fbabaa Addons: Renamed classStart/classEnd to match SymbolDatabase 2018-04-28 23:06:54 +02:00
Daniel Marjamäki 975be66c63 String concatenation in array: Improved handling of macros 2018-04-28 23:01:29 +02:00
rebnridgway 995b496ddf Add suppressions to the XML dump (#1166)
* Added parsing suppressions from dump xml.

* Added code to dump suppressions to an xml file

* Added declaration for dump function

* Suppressions will now be written to the xml file when a dump is requested

* Fixed syntax error

* Removed excess whitespace

* Fixed indentation to be consistent

* Fixed indentation to be consistent

* Fixed indentation to be consistent

* Added missing include for ErrorLogger::toXml

* Fixed suggestions from pull request #1166

Switched to using ranged for loop to iterate through suppressions.
Made the line number attribute optional, rather than 0 if not specified.  This means when Python deserialises it it will be None, which is more pythonic.

* Implemented checking suppressions in reportError

This modification expects suppressions and a function to be called to write a line of output to be passed in.  The function checks if any of the suppressions match the warning (with the new Suppression.isMatch function) and if so returns None.  This change maintains the old behaviour of returning the warning text, but adds the possibility of returning None if the warning was suppressed.

* Fixed code quality warnings

* Removed more extraneous whitespace
2018-04-24 22:19:24 +02:00
Daniel Marjamäki 5e31911fcd misra.py: fix false positives in 16.3 for unconditional blocks of code 2018-04-24 09:28:24 +02:00
Daniel Marjamäki 86a9deffbf misc.py: removed bailouts 2018-04-20 08:18:49 +02:00
Daniel Marjamäki 3c48e08e6c misc.py: write debug message when valueType is None 2018-04-19 22:23:34 +02:00
Daniel Marjamäki fb89c987b0 misra.py: Improved 'isBoolExpression' 2018-04-18 16:20:54 +02:00
Daniel Marjamäki f94a2b0019 misra.py: cppcheck handle rule 20.6 2018-04-17 08:15:36 +02:00
Daniel Marjamäki d181e98d02 misc.py: Added experimental ellipsisStructArg checker that warns when struct is passed to ellipsis function 2018-04-16 13:55:12 +02:00
Daniel Marjamäki 194b4096c2 renamed misc test file since it has c++ code 2018-04-16 13:17:47 +02:00
Daniel Marjamäki d65f00fe2e misc.py: Add check for implicitly virtual functions 2018-04-16 13:16:53 +02:00
Daniel Marjamäki 9579b12be9 misc.py: fixed FP 2018-04-16 12:55:27 +02:00
Daniel Marjamäki 19591298f1 misc.py: Fixed FP for string concatenation 2018-04-16 10:53:29 +02:00
Daniel Marjamäki 7031cc7e22 misc.py: Add addon for some misc checkers 2018-04-13 22:19:47 +02:00
Daniel Marjamäki 97c86ff0e6 Dumps: Added isVirtual/isImplicitlyVirtual info 2018-04-13 21:15:43 +02:00
Daniel Marjamäki 8f21ba91e3 cert.py: Fix FP 2018-04-12 20:23:50 +02:00
Daniel Marjamäki 1767fe525b Addons: Fixed handling of noname arguments 2018-04-10 11:10:10 +02:00
Sebastian d46e4c1df6
misra.py: Typo in number of rules (comment) (#1150)
I have no copy of the misra pdf but according to
https://sourceforge.net/p/cppcheck/discussion/general/thread/ccbe9e89/#a6ab
and the number of lines/rules printed by misra.py -generate-table i
guess 143 is really the correct number of rules.
2018-04-10 08:55:25 +02:00
Daniel Marjamäki 97b17d50aa cert.py: fixed fp in exp05 for non-pointer casts 2018-04-03 15:12:01 +02:00
Daniel Marjamäki d31ba0ca02 misra.py: updated 11.8 2018-04-03 15:11:25 +02:00
Daniel Marjamäki 2db7c6e1a3 cert.py: Add rule EXP-05: do not cast away const 2018-04-03 13:35:19 +02:00
Daniel Marjamäki 1270ae2ad8 cppcheckdata: fixed loading of function data 2018-04-03 13:20:21 +02:00
Daniel Marjamäki 4a36520af2 misra.py: reformatting -generate-table output 2018-04-02 13:04:44 +02:00
Daniel Marjamäki 15218b388f misra.py: Add -generate-table option that shows what rules are implemented 2018-03-31 12:52:00 +02:00
Daniel Marjamäki ed8fda571b misra.py: Add rule 4.1 2018-03-31 12:17:55 +02:00
Daniel Marjamäki 588ec80122 misra: the user must provide the rule texts in text file. 2018-03-24 13:28:40 +01:00
amai ed25e21929 Set executable bit for addons/ python scripts 2018-03-20 20:54:59 +01:00
Daniel Marjamäki 480d84d69c Fixed #8441 (MISRA Addon: FP 12.3 issued for initializer lists) 2018-03-18 22:05:31 +01:00
amai2012 449dcc15e8 Add links to external references 2018-03-16 08:12:39 +01:00
Daniel Marjamäki 1110cd0c57 misra.py: updated parsing of misra-rules.txt 2018-03-14 23:00:17 +01:00
Daniel Marjamäki c74b0934e9 misra.py: assume that '0' and '1' have essentially boolean types 2018-03-14 14:54:05 +01:00
Daniel Marjamäki b8d0da31de threadsafety.py: warn for local static non-class variables also 2018-03-14 11:55:01 +01:00
Daniel Marjamäki 08ee5709ed misra.py: updated 17.1 to catch non-compliant code in example suite 2018-03-14 09:41:23 +01:00
Daniel Marjamäki 348232a599 misra.py: catch all 15.6 bugs in misra exemplar suite 2018-03-13 14:22:25 +01:00
Daniel Marjamäki 49c8e42b30 misra.py: Clarify code for switch case fallthrough 2018-03-13 13:14:26 +01:00
Daniel Marjamäki caf0789ab3 misra.py: updated -verify behaviour, print all errors seen and not just the first 2018-03-12 15:51:41 +01:00
Daniel Marjamäki a705391054 misra.py: minor update 2018-03-12 15:47:06 +01:00
Daniel Marjamäki 77318d0e14 misra.py: updated 16.3 code 2018-03-12 15:16:57 +01:00
Daniel Marjamäki f10d170ad3 misra addon: handle [[fallthrough]] attribute 2018-03-12 13:43:23 +01:00
Jonathan Clohessy 589cc6049d Modified misra.py to fix issue introduced during last change (#1101)
Added additional elif confition to cause error checks to ignore .dump files
Previous change meant that .dump always falls into else statement and script exits
2018-02-26 22:08:22 +01:00
Daniel Marjamäki 21bb973702 Removed code metrics addon 2018-02-18 11:17:54 +01:00
Daniel Marjamäki 0e6e8ecda1 addons/metrics.py: count comments 2018-02-17 17:31:59 +01:00
Daniel Marjamäki 5db9345a08 addons/metrics: Add simple script for generating some metrics 2018-02-17 14:59:40 +01:00
Daniel Marjamäki 7f616a1805 misra.py: Add error handling when there are missing files, wrong arguments, etc 2018-02-17 07:39:37 +01:00
Daniel Marjamäki 6e8184f7cc cert.py: Added test for EXP46 2018-01-23 22:43:29 +01:00
Daniel Marjamäki 8eae9cdd60 cert.py: Added testcases for EXP42 and fixed the code a little 2018-01-23 17:18:47 +01:00
amai2012 fcbe88ad2f Move test files to subfolder 2018-01-23 11:33:13 +01:00
Daniel Marjamäki 55b3004000 misra.py: minor tweaks 2018-01-21 10:39:18 +01:00
Daniel Marjamäki 6f2d4361df Misra: Integration of MISRA in the GUI. The misra addon can now extract the rule texts from the PDF. 2018-01-20 14:13:09 +01:00
orbitcowboy 5a333dfa17 addons:y2038:README: fixed typos. 2017-11-07 11:14:09 +01:00
KMilhan 76c3cef4d6 MISRA 15.7 only checks if...else if constructs (#983) 2017-10-26 08:47:53 +02:00
Daniel Marjamäki 438b1ccb91 cert.py: update cert-INT31-C checker 2017-10-16 13:35:07 +02:00
Daniel Marjamäki 8a8339274b cert.py: add testfile 2017-10-15 16:18:29 +02:00
Daniel Marjamäki 56ceb5a58c cert.py: Added INT-31-C check, ensure that integer conversions do not result in lost or misinterpreted data 2017-10-14 22:24:24 +02:00
Daniel Marjamäki 243960eb8a Revert "Remove MISRA addon before the release of 1.81"
This reverts commit 9baefd8687.
2017-10-09 15:25:55 +02:00
Daniel Marjamäki 773cc07d44 cppcheckdata.py: parsing of NULL pointers from VS 32-bit and 64-bit 2017-10-07 22:44:35 +02:00
Daniel Marjamäki 9baefd8687 Remove MISRA addon before the release of 1.81 2017-10-07 13:38:21 +02:00
KMilhan 8b509a158f Make MISRA C 2012 12.2 work on C++ (#946) 2017-08-31 16:06:46 +02:00
Daniel Marjamäki b7af13ce63 cert.py: reformat output again 2017-08-15 21:44:43 +02:00
Daniel Marjamäki 2ca46ceae9 threadsafety.py: reformat output 2017-08-15 21:44:21 +02:00
Daniel Marjamäki 256adfbcb5 cert.py: Reformatting output 2017-08-15 20:34:54 +02:00
Daniel Marjamäki 051fb55e2c misra.py: Reformatting output 2017-08-15 20:34:44 +02:00
Daniel Marjamäki bb5b18cf7e Revert "Remove MISRA addon before the release of 1.80"
This reverts commit 2ecf47c328.
2017-07-29 16:28:57 +02:00
Daniel Marjamäki 2ecf47c328 Remove MISRA addon before the release of 1.80 2017-07-29 10:04:54 +02:00
Ayaz Salikhov 2e6a22e882 Improve Python code 2017-07-22 11:05:50 +02:00
Ayaz Salikhov 3dc4188292 Improve Python code 2017-06-05 13:23:00 +02:00
Ayaz Salikhov 2dd6168258 Improve Python code 2017-06-04 22:51:48 +02:00
Daniel Marjamäki 39d55a6f6e Revert "Temporarily remove MISRA addon"
This reverts commit b85150d45a.
2017-05-13 15:03:29 +02:00
Daniel Marjamäki b85150d45a Temporarily remove MISRA addon 2017-05-13 10:55:10 +02:00
Daniel Marjamäki 2b80f17714 y2038: fix problems 2017-04-19 06:46:53 +02:00
Daniel Marjamäki 82a68858ef Misra: Add rule 3.1 2017-04-18 20:47:11 +02:00
Daniel Marjamäki ea67086da4 Misra: Fix crash in rule 10.6 for bad AST 2017-04-18 19:57:49 +02:00
Daniel Marjamäki f707eceb20 Misra: Fix endless loop in rule 5.3 2017-04-18 19:54:43 +02:00
Daniel Marjamäki ce9f121ce6 Misra: Fix rule 5.3 2017-04-17 13:32:48 +02:00
Daniel Marjamäki 9305394abd Misra: Add rule 5.3 2017-04-17 13:17:37 +02:00
Daniel Marjamäki dd2eb9ad1a Misra: tweak rule 5.4 2017-04-17 12:57:21 +02:00
Daniel Marjamäki 11621b2b36 Misra: Add rule 5.4 2017-04-17 12:55:19 +02:00
Daniel Marjamäki c56926f4bd Misra: Add rule 5.5 2017-04-17 12:48:28 +02:00
Daniel Marjamäki 892f11b7f1 Misra: Fix FP, rule 15.6 2017-04-17 10:39:05 +02:00
Daniel Marjamäki a47a5e55e4 Misra: Fix FP, rule 15.6 2017-04-17 09:38:46 +02:00
Daniel Marjamäki 0adc4f0789 Misra: Fix FP, rule 16.6 2017-04-17 09:07:45 +02:00
Daniel Marjamäki 196b530ede Misra: Fix FP, rule 10.8 2017-04-17 08:44:30 +02:00
Daniel Marjamäki d6570b01e1 misra.py: Fix loading of rule texts 2017-04-17 08:35:17 +02:00
Daniel Marjamäki 4f64e67298 Misra: Add rule 8.11 2017-04-17 07:45:27 +02:00
Daniel Marjamäki 6c8712c57b Misra: Added --rule-texts=<file> flag 2017-04-16 21:38:26 +02:00
Daniel Marjamäki ad8fef8a2f Misra: Add rule 8.12 2017-04-16 19:01:33 +02:00
Daniel Marjamäki b2a846dff0 Misra: Add rule 9.5 2017-04-16 17:19:30 +02:00
Daniel Marjamäki b5bd9468de Misra: Add rule 8.14 2017-04-16 17:04:40 +02:00
Daniel Marjamäki efcbbd56ed Misra: Add rule 10.4 2017-04-16 13:39:49 +02:00
Daniel Marjamäki 73dd71991c Misra: Add rule 10.6 2017-04-16 13:28:08 +02:00
Daniel Marjamäki 7926cff8cc Misra: Add rule 10.8 2017-04-16 13:09:37 +02:00
Daniel Marjamäki 52985da13b Misra: Exception for rule 11.3 2017-04-16 12:17:42 +02:00
Daniel Marjamäki 85a6e9ce59 Misra: Add rule 11.3 2017-04-16 12:13:30 +02:00
Daniel Marjamäki a92ce98cab Misra: Add rule 11.4 2017-04-16 12:00:03 +02:00
Daniel Marjamäki 240b57bc9e Misra: Add rule 11.5 2017-04-16 11:47:44 +02:00
Daniel Marjamäki 657c9db478 Misra: Add rule 11.6 2017-04-16 11:41:00 +02:00
Daniel Marjamäki 6c0f4f46ce Misra: Harden rule 11.7 2017-04-16 11:01:49 +02:00
Daniel Marjamäki 1045ece946 dump: refactor valueType dump 2017-04-16 09:11:20 +02:00
Daniel Marjamäki ccf078747a Misra: Add rule 11.7 2017-04-15 22:06:18 +02:00
Daniel Marjamäki b59d46091e Misra: Add rule 11.8 2017-04-15 21:55:07 +02:00
Daniel Marjamäki dd8b96f4c8 dump: Read platform info from dump file 2017-04-15 19:15:48 +02:00
Daniel Marjamäki ef416d318e Misra: Add rule 11.9 2017-04-15 19:00:34 +02:00
Daniel Marjamäki d44cc16b1c Misra: Harden isFunctionCall() 2017-04-15 15:21:55 +02:00
Daniel Marjamäki 485f8c0820 Misra: Refactoring with isFunctionCall 2017-04-15 15:20:28 +02:00
Daniel Marjamäki 20aa099d05 Misra: Refactoring (use directives instead of rawTokens) 2017-04-15 15:13:18 +02:00
Daniel Marjamäki 2236034243 Misra: Refactoring 2017-04-15 14:29:29 +02:00
Daniel Marjamäki 6d0f75fbae Revert "Misra: Add rule 4.3"
This reverts commit eb11667c22.
2017-04-15 14:11:34 +02:00
Daniel Marjamäki eb11667c22 Misra: Add rule 4.3 2017-04-15 14:10:00 +02:00
Daniel Marjamäki 934183baef Misra: Add rule 21.11 2017-04-15 12:40:23 +02:00
Daniel Marjamäki 1b1099201c Misra: Add rule 21.9 2017-04-15 08:30:09 +02:00
Daniel Marjamäki a3cd587af3 Misra: Add rule 21.8 2017-04-15 08:24:24 +02:00
Daniel Marjamäki a5b3fe3998 Misra: Add rule 21.7 2017-04-15 08:08:17 +02:00
Daniel Marjamäki 95048527d0 Misra: Add rule 21.4 and 21.5 2017-04-14 22:58:42 +02:00
Daniel Marjamäki 06ef496dc7 Misra: Add rule 21.3 2017-04-14 22:53:45 +02:00
Daniel Marjamäki 8a614ed188 Misra: Add rule 20.5 2017-04-14 22:37:17 +02:00
Daniel Marjamäki bcf815ab10 Misra: Add rule 20.4 2017-04-14 22:33:59 +02:00
Daniel Marjamäki c8d3cccc21 Misra: Add rule 20.3 2017-04-14 22:25:35 +02:00
Daniel Marjamäki 79ef26d7a2 Misra: Add rule 20.2 2017-04-14 22:22:22 +02:00
Daniel Marjamäki 3c11aa781b Misra: Add rule 20.1 2017-04-14 21:49:52 +02:00
Daniel Marjamäki 87d0fdd709 Misra: Add rule 19.2 2017-04-14 21:14:26 +02:00
Daniel Marjamäki e3872f9718 Misra: Add rule 18.8 2017-04-14 21:09:25 +02:00
Daniel Marjamäki 8c42e052ac Misra: Added rule 18.5 2017-04-14 20:51:09 +02:00
Daniel Marjamäki e8af55e890 Misra: Added rule 17.8 2017-04-14 20:38:35 +02:00
Daniel Marjamäki f45a5ed29e Misra: Add rule 17.6 2017-04-14 18:51:12 +02:00
Daniel Marjamäki 41e07c0614 Misra: Added rule 17.1 2017-04-14 14:13:37 +02:00
Daniel Marjamäki e5286c61d5 Misra: Added rule 16.7 2017-04-14 13:23:53 +02:00
Daniel Marjamäki 47126e93a4 Misra: Added rule 16.6 2017-04-14 13:18:20 +02:00
Daniel Marjamäki 1cd8454239 Misra: Added rule 16.5 2017-04-14 13:07:48 +02:00
Daniel Marjamäki 33df403727 Misra: Refactoring with simpleMatch 2017-04-14 13:01:02 +02:00
Daniel Marjamäki e840d67f03 Misra: Added rule 16.4 2017-04-14 12:57:07 +02:00
Daniel Marjamäki 9c8fc6253a Misra: Added verification code in the script to simplify testing 2017-04-14 11:20:20 +02:00
Daniel Marjamäki 174bcc8d34 Misra: Add rule 16.3 2017-04-14 10:46:35 +02:00
Daniel Marjamäki aa2d1fd683 Misra: Add rule 16.2 2017-04-14 08:17:32 +02:00
Daniel Marjamäki 0052ef7437 Misra: Add rule 15.7 2017-04-14 08:05:14 +02:00
Daniel Marjamäki 471a9af348 Misra: Added rule 15.6 2017-04-13 23:24:35 +02:00
Daniel Marjamäki ec72330e7a Misra: Add rule 15.5 2017-04-13 23:07:41 +02:00
Daniel Marjamäki 4ebe520858 Misra: Added rule 15.3 2017-04-13 23:02:06 +02:00
Daniel Marjamäki 14a27f292e Misra: Added rule 15.2 2017-04-13 22:44:43 +02:00
Daniel Marjamäki b620853b25 Misra: Added rule 14.2 2017-04-13 22:26:12 +02:00
Daniel Marjamäki 466bbdcf6f Misra: Add Rule 14.1 2017-04-13 22:05:27 +02:00
Daniel Marjamäki 0c26d9e470 Misra: Added rule 13.6 2017-04-13 21:40:59 +02:00
Daniel Marjamäki cead8a62b4 Misra: Added rule 13.4 2017-04-13 19:43:06 +02:00
Daniel Marjamäki e7483e1b2a Misra: Added rule 13.3 2017-04-13 19:38:25 +02:00
Daniel Marjamäki 5b0ee55964 Misra: Added rule 13.1 2017-04-13 19:11:48 +02:00
Daniel Marjamäki b876249b6b Misra: Added 12.4 2017-04-13 11:05:04 +02:00
Daniel Marjamäki 44f9f1c065 Misra: Added 12.2 rule 2017-04-13 10:04:50 +02:00
Daniel Marjamäki ed03545725 Misra: Try to avoid FPs 2017-04-12 21:45:39 +02:00
Daniel Marjamäki 385d43facc Misra: Added 12.3 rule 2017-04-12 20:18:54 +02:00
Daniel Marjamäki 024b9c87d0 Misra: improve 7.3 2017-04-12 19:07:10 +02:00
Daniel Marjamäki f6afbbe65d Misra: updated 12.1 check 2017-04-12 16:19:13 +02:00
Daniel Marjamäki cb274bc71d Misra: Add rule 12.1 2017-04-11 22:21:54 +02:00
Daniel Marjamäki f4327f5e45 Misra: Remove feature matrix for now. Implement 7.3. 2017-04-11 19:03:35 +02:00
Daniel Marjamäki bf209890cb Misra: target MISRA C 2012 2017-04-11 14:45:38 +02:00
Daniel Marjamäki efae089b10 MISRA: Remove rule texts, it seems we are not allowed to include them. 2017-04-09 14:50:00 +02:00
Daniel Marjamäki a4277b7ac6 misra 19 fix 2017-04-09 13:51:36 +02:00
Daniel Marjamäki 3a386d23af Misra 32 2017-04-09 13:45:32 +02:00
Daniel Marjamäki 6e0af5d01f MISRA 19 and 28 2017-04-09 10:11:54 +02:00
Daniel Marjamäki 8755023c1c Fix MISRA 58 2017-04-08 19:33:26 +02:00
Daniel Marjamäki 8846077caa Fix and test MISRA 2017-04-08 19:00:50 +02:00
Daniel Marjamäki 33107ea64c Added addon with MISRA checkers. 2017-04-08 16:08:54 +02:00
Daniel Marjamäki 2ca85a1c40 dump: add isUnsigned/isSigned 2016-12-09 22:31:47 +01:00
Stefan Weil 57b57428c2 Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-27 11:40:42 +01:00
John-Paul Ore ffa8af69f2 Update cppcheckdata.py
fixes problem reading from dump files.  One character typo in Scope class.
2016-09-07 10:38:27 -05:00
XhmikosR f232f342e7 addons/*.py: formatting.
[ci skip]
2016-07-28 11:11:08 +03:00
Daniel Marjamäki 8c8ad96fe5 cppcheckdata.py: reformat documentation 2016-07-25 13:47:26 +02:00
XhmikosR 07b43c6929 Ran autopep8. 2016-07-25 13:16:55 +03:00
Albert ARIBAUD (3ADEV) 303622f01c Update Y2038 addon
- standardize on kernel's 'Y2038-[un]safe'
- expand Y2038-unsafe symbols list
- make y2038 addon C test more complete
2016-06-29 11:25:11 +02:00
Daniel Marjamäki 85c7456546 http://cppcheck.sourceforge.net => http://cppcheck.net 2016-06-05 18:17:47 +02:00
Albert ARIBAUD (3ADEV) 38e70dfb74 Preprocessor directives for addons
This patch augments the XML dumps with a 'directivelist'
subnode which lists all raw preprocessor directives met
while reading the source code in each configuration.

Also, the addons/cppcheckdata.py file has been extended
to give easy access to the list of directives and to
provide Python support for the --template (or short -t)
option.

Finally, an new addon, addons/y2038/y2038.py, is created
to detect when a glibc symbol might be Y2038-sensitive,
based on whether and how _TIME_BITS and _USE_TIME_BITS64
are defined when meeting the symbol.
2016-01-15 12:36:35 +01:00
Matthias Krüger 8f84f139d7 addons: threadsafety: print name of local static object in message. 2016-01-12 20:31:18 +01:00
Daniel Marjamäki 7d4c37430b minor tweak of comment 2015-12-14 20:30:13 +01:00
Daniel Marjamäki 8f27cec991 Revert "minor tweak of comment"
This reverts commit b1d1869f22.
2015-12-14 20:29:29 +01:00
Daniel Marjamäki b1d1869f22 minor tweak of comment 2015-12-14 20:03:40 +01:00
Albert ARIBAUD (3ADEV) e7fdb1c825 Fix multiple config dumps
With multiple configurations, option --dump only dumps
the last configuration.

Fix it to dump every configuration.

Also update all Python addons so that they can handle
multiple-configuration dumps.

Additionally run autopep8 on addons/*.py.

The results of 'make test' before and after applying
this commit are identical.
2015-12-14 18:20:35 +01:00
Daniel Marjamäki 5d1307814b addons: Added an addon that locates casts. 2015-11-28 09:29:19 +01:00
Daniel Marjamäki 4464d309fa cert.py: remove messages for reading struct padding data. in the EXP-42 warning describe how it can be fixed 2015-08-29 08:25:48 +02:00
Daniel Marjamäki 498c920180 addons/cert.py: better handling of structs. read pragmas in the file. 2015-08-28 18:07:12 +02:00
Daniel Marjamäki eb3b3de81f cppcheckdata: Added doxygen comments 2015-08-26 18:10:33 +02:00
XhmikosR 7d0075357e PEP8 fixes.
[ci skip]
2015-08-21 11:59:52 +03:00
Daniel Marjamäki 502eebfc9c addons: fix initialization in CppcheckData when multiple files are parsed 2015-08-19 12:16:13 +02:00
Daniel Marjamäki 71eb96b8d3 Addons: Added simple addon checking for CERT rule EXP42-C. Don't compare struct padding data. 2015-08-19 10:21:25 +02:00
Daniel Marjamäki abbe11f3b7 Addons: Added cert.py 2015-08-18 16:14:53 +02:00
Daniel Marjamäki 248f468c67 Addons: Use builtin xml library instead of lxml 2015-08-18 10:59:57 +02:00
Daniel Marjamäki 339fbd4be3 addons/naming.py: some refactoring and write a comment that says how it is used 2015-07-28 14:50:30 +02:00
Daniel Marjamäki 0e82730ee4 addons/naming.py: fixed error report for function name 2015-07-28 14:34:37 +02:00
Daniel Marjamäki 8b8d898b96 Addons/naming.py: verify variable/function names against regular expressions 2015-07-28 14:20:38 +02:00
Daniel Marjamäki 5a57e4030a dump: Add Function name attribute 2015-07-28 14:18:58 +02:00
Daniel Marjamäki d828cd29cb cppcheckdata.py: Added comments 2015-06-21 13:26:32 +02:00
Daniel Marjamäki 1df0204bbe addons: Use bool instead of string for cppcheckdata properties is... 2015-06-21 09:54:07 +02:00
Daniel Marjamäki d0e6b77fd1 cppcheckdata.py: moved file from tools to addons 2015-06-21 09:47:52 +02:00
Daniel Marjamäki 94e2018904 addons/threadsafety.py: Add simple addon that analyses threadsafety. 2015-06-20 22:06:22 +02:00