Commit Graph

190 Commits

Author SHA1 Message Date
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Daniel Marjamäki d5bf5b7ad2 Preprocessor: allow that 'missingInclude' messages are suppressed with '--suppress=missingInclude' 2011-08-20 11:23:59 +02:00
Daniel Marjamäki 961b6e7752 Preprocessor: Added safety checks in case the code is corrupt. Related to ticket #2998 2011-08-14 18:35:34 +02:00
Kimmo Varis cfcfa3f000 Use "enabled" list for the style checking.
Settings-class currently enables style checking via dedicated
boolean attribute. All other CLI's enable-options are handled
through the enable-list. This commit moves style-check enabling
to use the enable-list.

Main advantage is the consistency how options are handled/stored
in the Settings class. Which also unifies using them for the other
code. You need to enable certain type of checks? Use the
addEnabled()-method. You want to check if certain type of checks
are enabled? Use the isEnabled()-method.
2011-08-07 10:28:52 +03:00
Daniel Marjamäki e82df7292f Fixed #2919 (Wrong file name reported with #error in header) 2011-08-03 07:28:37 +02:00
Reijo Tomperi ee7b8d53c6 Fix: #2942 (segmentation fault of cppcheck ( #elif (){ ))
http://sourceforge.net/apps/trac/cppcheck/ticket/2942
2011-08-02 22:06:27 +03:00
Simon Martin fc0f75fe6a Preprocessor: Fix #if0 #elif todo test case. Ticket: #2619 2011-07-24 08:54:24 +02:00
Daniel Marjamäki b66e6e73db Fixed #2917 (Problem with || in #if) 2011-07-18 21:44:23 +02:00
Daniel Marjamäki c55b0ff651 Fixed #2871 (Define in source not set when -D is used) 2011-07-16 16:59:06 +02:00
Daniel Marjamäki c299d02dba astyle formatting 2011-07-16 09:32:35 +02:00
Daniel Marjamäki 07a1222ac6 Preprocessor: fix handling of (1&&2) condition 2011-07-16 09:24:27 +02:00
Daniel Marjamäki b6dcdd7b79 Preprocessor: Don't report that there are missing system includes unless --debug-warnings has been given. 2011-05-15 09:38:13 +02:00
Daniel Marjamäki be9e66efff Fixed #2782 (Segfault with #asm) 2011-05-11 19:27:19 +02:00
Daniel Marjamäki d998477c69 renamed --check-includes to --check-config 2011-05-02 21:28:33 +02:00
Daniel Marjamäki 8603919b2d Missing includes - normally just report that there are missing includes. The --check-includes can then be used to check what missing includes there are. Ticket: #2719 2011-05-02 14:58:16 +02:00
Daniel Marjamäki cc8a5fd23e reverted 761dd419 - reporting excessive missing include messages 2011-05-02 14:02:49 +02:00
Daniel Marjamäki 761dd419af Fixed #2719 (Fix excessive false positives in include-file handling) 2011-05-01 12:59:08 +02:00
Greg Hewgill d8a4383f5f Use tolowerWrapper wherever appropriate 2011-04-27 21:13:05 +12:00
Daniel Marjamäki 6fc59b0257 Fixed #2740 (inline cmd // cppcheck-suppress does not work anymore for 1.48) 2011-04-22 20:25:17 +02:00
Martin Exner 2b08744b97 Fixed #2676 (setVarId: variables with global scope qualification :: don't get varids) 2011-04-18 06:56:39 +02:00
Daniel Marjamäki 58dbbb0cab Inconclusive checking: Report inconclusive errors with reportInconclusiveError. It takes the same parameters as reportError. 2011-04-14 18:02:01 +02:00
Daniel Marjamäki e5d43d4ed2 Renamed Settings::stupid to Settings::experimental 2011-04-10 15:55:08 +02:00
Daniel Marjamäki 30ee9ba6e4 Added Settings::stupid flag that can be used to hide checking that generates false positives. 2011-04-10 13:23:45 +02:00
Daniel Marjamäki 76679255a3 Preprocessor: Use %oror% in multiCompare pattern 2011-04-10 11:50:19 +02:00
Daniel Marjamäki e94e3eca82 Preprocessor: Use %oror% in multiCompare pattern 2011-04-10 11:47:49 +02:00
Daniel Marjamaki fbc8223a6b Preprocessor: Fixed expandMacros problem. Ticket: #2707 2011-04-07 16:53:42 +02:00
Daniel Marjamäki b5bdb9eeae fixed gcc compiler warning 2011-04-06 21:40:50 +02:00
Daniel Marjamaki cb473a48b7 Preprocessor: Use Settings::debugwarnings instead of NDEBUG to determine if 'missing system include' should be reported or not 2011-04-06 19:49:04 +02:00
Stefan Weil 675e63b6a7 Spell checks 2011-03-30 16:45:31 +02:00
Daniel Marjamäki a177fc4b24 Preprocessor: made sure string::iterator is valid after string::erase 2011-03-07 22:00:30 +01:00
Daniel Marjamäki 80235b0d53 astyle formatting 2011-03-06 21:15:58 +01:00
Greg Hewgill 7daa6b9370 Always pass unsigned char to ::isspace to prevent runtime error in MSVC 2011-03-07 07:58:44 +13:00
Greg Hewgill b9df7735c5 switchCaseFallThrough is now an inconclusive check 2011-03-06 13:06:30 +13:00
Greg Hewgill c8394909c0 Relax detection of 'fall through' comment so it only adds a suppression if it immediately precedes 'case' or 'default' 2011-03-06 12:14:10 +13:00
Greg Hewgill 8c245cfd2f switchCaseFallThrough is now a coding style check (ticket #2623) 2011-03-06 09:43:27 +13:00
Greg Hewgill e12ae654a8 Support a few more common styles of "fall through" comment 2011-03-05 18:02:38 +13:00
Greg Hewgill cc7e05a5b0 fix case where fall through comment precedes preprocessor line 2011-03-05 00:45:58 +13:00
Greg Hewgill 1a606a57fd slightly more flexible detection of 'fall through' comment 2011-03-05 00:45:58 +13:00
Greg Hewgill 610d2efaea recognise fall through in c style comments 2011-03-05 00:45:58 +13:00
Greg Hewgill 93ea774484 initial simplistic implementation of switchCaseFallThrough 2011-03-05 00:45:57 +13:00
Greg Hewgill 2efb2efaca refactor #if 0 handling to leave preprocessor statements alone 2011-03-01 20:04:11 +13:00
Greg Hewgill a331516735 handle #if (0) after removing parentheses 2011-03-01 19:50:17 +13:00
Greg Hewgill 31c56d7353 handle embedded whitespace in #if 0 processing 2011-03-01 19:32:47 +13:00
Daniel Marjamäki 96c85104ab astyle formatting 2011-02-26 20:09:14 +01:00
Daniel Marjamäki ab2bf0ee0c Fixed #2575 (false positive: Preprocessor does not ignore #include within #if 0 block) 2011-02-26 10:04:38 -08:00
Daniel Marjamäki 32a49235e3 Fixed #2578 (Preprocessor does not correctly handle #define A 0 / #if A) 2011-02-23 13:08:24 -08:00
Daniel Marjamäki 9983aa5721 Fixed #2605 (cppcheck hangs with 100% cpu load ( #define = )) 2011-02-22 19:55:02 +01:00
Daniel Marjamäki c52704e636 astyle formatting 2011-02-20 21:00:03 +01:00
Daniel Marjamäki c3fba356c0 Fixed #2563 (#if equality testing does not ignore parentheses) 2011-02-20 20:57:28 +01:00
Greg Hewgill 98ab34b2b5 Support cppcheck-suppression in C style comments 2011-02-20 11:44:42 +13:00