362 Commits

Author SHA1 Message Date
Daniel Marjamäki
e962f57a99 Rename private member variables 2018-06-17 19:20:07 +02:00
Daniel Marjamäki
fe0bd8ff6c Renamed exitcode to mExitCode 2018-06-17 07:43:25 +02:00
Daniel Marjamäki
6ff6f0ae45 Renamed cfg to mCurrentConfig 2018-06-17 07:40:13 +02:00
Daniel Marjamäki
cb0bea1749 Renamed _simplify 2018-06-17 07:37:10 +02:00
Daniel Marjamäki
b90d1bc020 Renamed member fileInfo to mFileInfo 2018-06-17 07:36:05 +02:00
Daniel Marjamäki
c5e0576961 Renamed analyzerInformation 2018-06-17 07:31:34 +02:00
Daniel Marjamäki
54ba0e58c1 Renamed _useGlobalSuppressions 2018-06-17 07:29:07 +02:00
Daniel Marjamäki
b992b4a4f0 Renamed _errorList 2018-06-16 23:31:16 +02:00
Daniel Marjamäki
79ffe1d4fc Rename _tokenizer, _settings, _errorLogger 2018-06-16 16:10:28 +02:00
orbitcowboy
33777c5b72 Improved const correcntess of local variables. 2018-05-29 13:24:48 +02:00
Daniel Marjamäki
d7dfa29864 Preprocessor: only throw errors upon request. 2018-05-28 14:11:59 +02:00
Daniel Marjamäki
2ffbb37cee modernize cppcheck.cpp, use range for loops 2018-05-22 23:22:46 +02:00
Daniel Marjamäki
2b14b71c93 Updated output when Cppcheck fails to find valid configurations 2018-05-17 10:27:05 +02:00
amai2012
7062df5d78 #8585 --check-config aborts due to unhandled simplecpp::Output exception 2018-05-17 08:59:10 +02:00
Daniel Marjamäki
6bd4bdb0f9 Updated 'noValidConfiguration' message. It should not write this message when there is no code. It should be possible to see the preprocessor errors otherwise it is hard to fix the configuration. 2018-05-15 15:42:54 +02:00
PKEuS
3d860e6f36 Bump simplecpp 2018-05-14 13:00:22 +02:00
Daniel Marjamäki
1e7c1841f7 Fixed #8515 (Wrong info message about unmatched suppression) 2018-05-11 09:01:24 +02:00
Daniel Marjamäki
c266688784 Fix syntax error 2018-05-08 10:21:03 +02:00
Daniel Marjamäki
315dc2ad8a only show information message when information messages are enabled 2018-05-08 09:47:14 +02:00
Daniel Marjamäki
0bff08ca44 Fixed #1378 (#error macro makes unrelated errors undetectable) 2018-05-06 22:02:23 +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
8cc7131ee9 Rename CppCheck::processFile to CppCheck::checkFile 2018-04-21 13:28:26 +02:00
PKEuS
b596b0d549 Refactorization: pass std::string directly to std::*fstream 2018-04-11 09:50:42 +02:00
PKEuS
b15cc3f236 Refactorization: Replace several push_back-sequences by initializer lists 2018-04-09 09:54:39 +02:00
Daniel Marjamäki
a0906140a6 Suppressions: New extensible Suppressions xml format that allow more attributes. To start with it also allows symbolName. 2018-04-09 06:43:48 +02:00
IOBYTE
d68f07e50c Add purgedConfiguration to list of error ids. (#1087)
purgedConfiguration was not showing up in the GUI supression list.
2018-02-10 22:30:49 +01:00
Daniel Marjamäki
db274e8308 Fix testrunner in cygwin 2018-02-10 15:34:49 +01:00
Daniel Marjamäki
71511f3131 Refactor f487182 2018-02-06 08:59:36 +01:00
Daniel Marjamäki
c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Ivan Maidanski
97ffec85c0 Fixed #7502 (Correct exit code if never used function is found) (#1026) 2018-01-12 08:24:01 +01:00
PKEuS
b684e1f202 Updated AStyle to version 3.0.1 2018-01-08 20:20:33 +01:00
baltth
6cbd69bf2d Fix define parsing from compile_command.json (#1013)
* Define value parsing from compile_commands.json

* Handle escaping in defined values

* Added test for importCompileCommands

* Added used defines for imported projects

* Fixed unnecessary string literals
2017-12-26 13:04:27 +01:00
Ayaz Salikhov
be2c65eb58 Simplify int vs bool 2017-10-08 07:54:39 +02:00
Daniel Marjamäki
5c7cf584ef bump simplecpp 2017-09-12 22:42:10 +02:00
Ayaz Salikhov
b8cd7dbb5c Use nullptr instead of 0 or NULL (#936) 2017-08-09 20:00:26 +02:00
Daniel Marjamäki
9861240e79 ImportProject: Only expose Cppcheck Visual Studio defines for Cppcheck 2017-08-08 22:27:08 +02:00
Daniel Marjamäki
5fa7a4edc4 GUI: save dumpfiles in buildDir if possible 2017-08-03 22:54:38 +02:00
Daniel Marjamäki
61eccd7070 Fix dump 2017-08-03 18:03:59 +02:00
Daniel Marjamäki
1961d6d0f7 CppCheck: make sure preprocessor syntax errors are reported 2017-05-28 20:34:58 +02:00
Ayaz Salikhov
28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
uburuntu
d41d091c07 ENH: perfomance: seeking of one char is more efficiently 2017-05-27 04:15:54 +02:00
Daniel Marjamäki
899615c1e4 update simplecpp includes
[ci skip]
2017-05-18 22:26:07 +02:00
Daniel Marjamäki
9d08cbf4d2 Fix 'make checkcfg' 2017-05-18 22:10:08 +02:00
Daniel Marjamäki
340c687cbf Revert "Use 'Stringification => Tokenizer' until some issues have been fixed"
This reverts commit c2727691a461a3ea9154ce6d288f129612368347.
2017-05-18 21:53:25 +02:00
Daniel Marjamäki
c2727691a4 Use 'Stringification => Tokenizer' until some issues have been fixed 2017-05-18 09:33:41 +02:00
Daniel Marjamäki
bc12a0b21f Handle empty token list better (for instance when Preprocessor::validateCfg() see problem) 2017-05-17 22:30:20 +02:00
Daniel Marjamäki
1f4b84379d Fix for #pragma asm 2017-05-17 21:58:46 +02:00
Daniel Marjamäki
59335f80d2 Try to fix windows build. Reduce header dependencies 2017-05-17 15:38:31 +02:00
Daniel Marjamäki
6230919976 Skip 'Stringification => Tokenize' step 2017-05-17 14:57:54 +02:00
Daniel Marjamäki
6967d68137 Add --plist-output argument 2017-05-16 14:07:23 +02:00