Commit Graph

78 Commits

Author SHA1 Message Date
Thomas Jarosch f6e68914ea Add check for cppcheck's internal API usage (#3263)
First checks:
- Simple pattern used inside Token::Match()
- Complex pattern used inside Token::simpleMatch()

The checks get enabled by passing "--enable=internal".
It's not included in "--enable=all".

If you see something that needs further tweaking, just go for it!
2011-10-28 22:46:07 +02:00
Daniel Marjamäki ab827e3631 Merge pull request #40 from joshbeck/master
Added option to set #ifdef configuration check limit
2011-10-22 00:51:05 -07:00
Marek Zmysłowski b332ea8222 Fixed #3204 (Refactor standards support in Settings) 2011-10-22 09:45:48 +02:00
Joshua Beck 56561835f8 Add option to set #ifdef configuration check limit 2011-10-18 19:52:55 -05:00
PKEuS f8074b71d2 Fixed #2470 (False negative: Possible null pointer dereference (C++0x keyword 'nullptr')) 2011-10-16 12:54:58 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Stefan Weil bf25340fd3 Settings: add missing initialisation for member variable c99 (reported by Valgrind) 2011-10-08 10:29:11 +02:00
Stefan Weil 2193572c9e test _WIN64 before _WIN32 (64-bit compiler defines both macros) 2011-09-30 14:12:44 -04:00
Robert Reif f97424b242 start adding Windows ASCII TCHAR conversion support 2011-09-24 14:51:03 -04:00
Robert Reif 2fe182b833 set windows platform type to type executable was compiled on 2011-09-18 13:19:00 -04:00
Robert Reif be660003ec start adding conversions from common Windows types to standard types 2011-09-18 13:06:54 -04:00
Robert Reif 3e35ea0972 fix sizeof long double for unix64 for #2888 (Allow defining sizes of base types) 2011-09-18 08:40:08 -04:00
Robert Reif b5d22fda0d fix #2888 (Allow defining sizes of base types) 2011-09-17 19:40:52 -04:00
Daniel Marjamäki d23c58d387 enable: break out 'performance' and 'portability' from the 'style' id. Ticket: #3074 2011-09-03 15:30:30 +02:00
Kimmo Varis 716679ec7d Move Suppressions class to own source files.
I want to use Suppressions class also in GUI. And that is easier
to do when it is not internal class of Settings class. And in
general is it more natural that Settings class only contains list
of suppressions and implementation is separate.
2011-08-22 19:57:28 +03:00
Daniel Marjamäki fe78e28d70 Cppcheck: Don't show information messages about interrupted checking unless --enable=information has been given. 2011-08-19 22:32:57 +02:00
Reijo Tomperi dd666b7c1b Add command line option: --debug-fp ... If used, cppcheck will print out the code generating error into output stream.
This is ment to be used for debugging false positive errors in Cppcheck.
Current implementation tries two alternatives. Without all headers or with all headers and prints out the option with
less code. In future versions this could try with individual headers or group of header files.
2011-08-16 22:58:27 +03:00
Daniel Marjamäki 01b9c0707d Settings: Removed the --enable=posix option. Ticket: #2949 2011-08-14 09:45:53 +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
Kimmo Varis f4950ea836 CLI: Rename --posix to --enable=posix.
Ticket: #2949 (new check: (style) finding non-reentrant functions)
Ticket: #2952 (CLI option --posix is wrong)
2011-08-03 10:28:36 +03:00
Ettl Martin 6b23dd9928 added a check to detect nonreentrant functions and a --posix switch 2011-07-29 18:27:01 +02:00
Daniel Marjamäki d76861270a Fixed #2797 (Inline suppressions do not handle filenames correctly) 2011-06-29 20:23:39 +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 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
Greg Hewgill 256e7dee21 Allow suppressing all warnings (using *) for specified file or files 2011-03-10 22:00:48 +13:00
Greg Hewgill a4de6a3455 be sure to list unmatched suppressions only for the currently processed file 2011-02-17 21:46:14 +13:00
Greg Hewgill 5d74325015 implement unmatchedSuppression information message 2011-02-16 23:02:37 +13:00
Greg Hewgill 331788246b factor out addSuppressionLine from file reading function 2011-02-16 22:26:16 +13:00
Greg Hewgill 8a85b18283 use suppression wildcard glob instead of special-case empty filename 2011-02-16 20:19:18 +13:00
Greg Hewgill 1418c12261 astyle formatting 2011-02-13 10:01:32 +13:00
Greg Hewgill 421b32efb4 use std::stack instead of std::list where appropriate 2011-02-13 09:55:45 +13:00
Greg Hewgill 7a219b1fb8 support wildcard characters * and ? in suppression list 2011-02-09 00:19:57 +13:00
Greg Hewgill a9f2879889 factor out file matching into own class 2011-02-09 00:19:56 +13:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Daniel Marjamäki 033e759c39 command line: added 'information' id to enable 2011-01-05 21:20:21 +01:00
Daniel Marjamäki af80384ae7 xml2: replace --xml2 with --xmlver=2. Ticket: #2106 2010-12-02 17:32:51 +01:00
Daniel Marjamäki 12c8eeff2c xml2: Added experimental --xml2 result format. Ticket: #2106 2010-12-01 21:24:17 +01:00
Cary R 59139b17cb Fixed #2138 (Add support for comments in suppression file) 2010-10-26 21:22:11 +02:00
Daniel Marjamäki f490ebcf88 Fixed #1872 (Confused -v switch) 2010-09-03 13:30:49 +02:00
Daniel Marjamäki 3a8e7b4bf0 Exception safety: Removed the noisy checks and keep the useful checks 2010-08-31 22:22:59 +02:00
Daniel Marjamäki d45186d645 Added --debug-warnings that we can use to enable various debug warnings 2010-08-27 20:28:00 +02:00
Daniel Marjamäki 6cb7fefdbf Added command line option --report-progress. ticket: #1926 2010-08-12 21:03:33 +02:00
Daniel Marjamäki 050011d287 Fixed #1881 (false positive: The function '...' can be const (nonconst code is hidden inside #if)) 2010-08-07 13:08:36 +02:00
Daniel Marjamäki c9b1804954 astyle formatting 2010-08-04 20:28:41 +02:00
Daniel Marjamäki 08e2d91372 Fixed #1919 (option '--suppressions file' can not work when filename includes colon) 2010-08-03 17:52:03 +02:00
Daniel Marjamäki a274cb1015 cleanup headers 2010-07-31 08:52:28 +02:00
Daniel Marjamäki 3ad8f98c61 Refactoring: Settings::addSuppression return error message and callers make sure it's reported properly. Ticket: #1839 2010-07-23 23:12:56 +02:00
Daniel Marjamäki 37c959023a Refactoring: The Settings::addEnabled will return error message instead of throwing it. Ticket: #1866 2010-07-23 13:29:16 +02:00