versat
0cf82d6d45
cppcheck.cpp: Fix reserved name "stderr"
...
Using "stderr" as variable name results in build errors on Windows.
2020-01-20 11:12:23 +01:00
Daniel Marjamäki
8ac2cdd9ff
Clang import; If there are syntax errors then abort analysis
2020-01-19 17:30:57 +01:00
Daniel Marjamäki
0eccffe8e3
--clang; require that --cppcheck-build-dir. output files are needed.
2020-01-19 12:33:17 +01:00
Daniel Marjamäki
f7a30fc99f
Rename Verification => Bughunting
2020-01-18 07:25:57 +01:00
Daniel Marjamäki
7820b5dbcc
Rename 'Verification' to 'Bug hunting'
2020-01-14 21:17:07 +01:00
Daniel Marjamäki
1e207e42c5
CppCheck: Try to handle '"' properly in split()
2020-01-12 17:13:26 +01:00
Daniel Marjamäki
380cc78077
Clang; Run ValueFlow
2020-01-11 14:00:41 +01:00
Daniel Marjamäki
6b983a9587
Revert ValueFlow changes, there was unexpected problems in testrunner
2020-01-11 13:11:19 +01:00
Daniel Marjamäki
052eaba632
Clang; run ValueFlow analysis
2020-01-11 13:04:51 +01:00
Daniel Marjamäki
9c38a659a1
Clang import; Fixed CXXConstructExpr without child
2020-01-11 12:16:48 +01:00
Daniel Marjamäki
4c778e0999
Clang import; Rename files/namespace
2020-01-10 16:29:06 +01:00
Daniel Marjamäki
729fca8728
Clang import; handle locations better, only expand function bodies in source file
2020-01-10 14:59:34 +01:00
Daniel Marjamäki
34a26c7dd7
Clang import; Pass include paths to clang
2020-01-09 19:15:01 +01:00
Daniel Marjamäki
98e700e30d
Clang import; Tweaks
2020-01-09 14:13:39 +01:00
Daniel Marjamäki
90e7a94ff4
Clang importer; Allow throw
2020-01-09 13:58:14 +01:00
Daniel Marjamäki
3d2d4c5cbd
Clang import; Tweaks
2020-01-09 10:49:47 +01:00
Daniel Marjamäki
c4c929a6a7
Clang import: StringLiteral, funcdecl3, determine includes with clang -v
2020-01-08 16:36:51 +01:00
Daniel Marjamäki
0b765cd253
Clang importing; Use ValueFlow
2020-01-05 19:21:13 +01:00
Daniel Marjamäki
211af1d4fe
Clang import: debug output
2020-01-05 16:58:13 +01:00
Daniel Marjamäki
bc17b9a1be
Importing Clang ast dump: Run ValueFlow analysis
2020-01-05 16:23:02 +01:00
Daniel Marjamäki
b03bdfaf72
Import Clang ast dump (experimental)
2020-01-05 15:12:53 +01:00
Daniel Marjamäki
4b4f7ea60b
Verification; Updated report
2019-12-27 19:05:22 +01:00
Daniel Marjamäki
caab1e61bb
Fixed #9542 (Better error handling for --addon)
2019-12-17 12:00:01 +01:00
Maksim Derbasov
68a67a910e
Remove .dump file after plugins execution ( #2451 )
2019-12-17 08:40:59 +01:00
Sebastian
95696ead23
Catch preprocessor errors possibly issued during loading files ( #2430 )
...
* Also catch preprocessor errors possibly issued during loading files
Currently only errors that are issued during preprocessing are caught.
* Bump simplecpp, implement suggestions
Use return value checking instead of catching an exception for calling
Preprocessor::loadFiles().
Handle new enum value simplecpp::Output::EXPLICIT_INCLUDE_NOT_FOUND
where the corresponding enum is used in Cppcheck.
* Use "noloc" location if an explicit include can not be opened
2019-12-09 19:16:55 +01:00
Sebastian
c990d10ffa
Check for JSON error when parsing addon .json files + fixes ( #2374 )
...
* cppcheck.cpp: Check for JSON error when parsing addon .json files
This fixes that errors in JSON files given via `--addon=*.json` are
silently ignored and maybe only a part of the JSON file is used.
Now the error message which picojson can return is checked and a
corresponding error message is returned again by getAddonInfo().
* naming.json: Fix missing comma
* CLI: Fix naming violations detected by addon naming.py via naming.json
* Addon naming: Add argument for validating names of constants
* LIB: Rename functions/variables so they are valid, loosen naming rules
* GUI: Fix naming violations
2019-11-20 15:37:09 +01:00
Daniel Marjamäki
81fff2edf1
Fixed #9464 (Import compile database; only check given configuration)
2019-11-09 17:51:42 +01:00
Oliver Stöneberg
9028b4a81d
do not access static methods through instance ( #2189 )
2019-09-20 21:54:30 +02:00
Daniel Marjamäki
2d651b09fc
ExprEngine: Add new experimental path-sensitive data flow analysis. Initially used for 'verification' but could possibly later be used as a complement in the normal analysis. The code is work-in-progress and hacky!
2019-09-17 21:00:59 +02:00
Daniel Marjamäki
a5ba82c2d3
Fixed #9260 (--template=gcc does not work correctly with -j)
2019-08-18 16:33:32 +02:00
Daniel Marjamäki
d95f29b23a
Fixed test/cli
2019-08-18 12:51:32 +02:00
Daniel Marjamäki
2d9a131817
Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column'
2019-08-18 12:19:05 +02:00
Daniel Marjamäki
a17f2a6f05
Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead.
2019-08-17 10:53:07 +02:00
Daniel Marjamäki
6a260929e2
CLI: error id from addon is <addon>-<id>
2019-08-10 07:43:47 +02:00
amai2012
b0fbbb5aa7
Convert SHOWTIME_MODES to enum class
2019-07-31 22:35:51 +02:00
Daniel Marjamäki
d11d6f112e
Detect shadowed arguments
2019-07-17 17:08:42 +02:00
Daniel Marjamäki
341406ab17
Fixed Cppcheck warning; ::AddonInfo::getFullPath can be static
2019-06-29 07:59:55 +02:00
Daniel Marjamäki
c97dc79815
--addon: Use json for addon output
2019-06-24 19:29:43 +02:00
Daniel Marjamäki
de9c999d79
Better handling of spaces in paths
2019-06-22 19:20:15 +02:00
Daniel Marjamäki
59c7be307c
Travis: Fix test/cli testing
2019-06-16 19:11:12 +02:00
Daniel Marjamäki
ba0a75881a
Refactor AddonInfo::getAddonInfo
2019-06-16 15:46:20 +02:00
eivindt
44670005ea
Record C/CPP/Posix Standard used for cppcheck in dump file / use this for misra checking ( #1782 )
...
* Add cmd parameter for choosing between C90 and C99
Misra specifies different requirements to the uniqueness of
macros/enums/variables depending on what C standard
that's being used.
* Add standards configuration to each dump file
Read standards config from misra addon to decide what rules to use.
* Posix as standard setting should be deprecated. Don't include this in the xml
* Rewritten to use a switch
2019-06-14 12:06:57 +02:00
eivindt
5dd7dacfd7
Fix small error using correct name for addon script when specified in json file ( #1881 )
2019-06-13 14:11:21 +02:00
Daniel Marjamäki
b3a46e72dc
Fix and test syntaxError suppression
2019-05-01 11:54:13 +02:00
Daniel Marjamäki
2e694f38c8
Refactoring; Use const reference instead of const
2019-04-29 08:53:36 +02:00
Daniel Marjamäki
45e5edce16
Fixed Cppcheck shadowVariable warning
2019-04-28 12:04:44 +02:00
Daniel Marjamäki
ece13033b2
dmake: use -isystem for externals to avoid compiler warnings
2019-04-19 14:52:49 +02:00
Daniel Marjamäki
a18025c95d
test/cli: tweaks for running it in windows
2019-04-14 15:53:32 +02:00
Daniel Marjamäki
b94f4176f1
test/cli: execute addon
2019-04-14 15:00:03 +02:00
Daniel Marjamäki
b1b5b27b4e
addons: write column in error message(s)
2019-04-13 10:22:13 +02:00
Daniel Marjamäki
2015f25a84
addon: Fix parsing of addon output
2019-04-10 18:28:46 +02:00
Daniel Marjamäki
cf6f886a68
Addons: try to create dump file in cppcheck build dir
2019-04-09 07:05:41 +02:00
Daniel Marjamäki
1f68e038be
Addons: Describe running addons from cppcheck in the manual
2019-04-08 21:31:38 +02:00
Daniel Marjamäki
44dcbda88e
Addons: Fixed handling of addon configuration
2019-04-08 19:42:16 +02:00
Daniel Marjamäki
4bb06eceeb
astyle formatting
...
[ci skip]
2019-04-08 18:53:14 +02:00
Daniel Marjamäki
50a5763cf5
Addons: Make it possible to configure any addon with json
2019-04-08 18:07:23 +02:00
Daniel Marjamäki
a508b2abfd
Addons: Add same handling in Windows as in Linux
2019-04-07 19:53:34 +02:00
Daniel Marjamäki
bf9006737a
Addons: Adding support in Cppcheck CLI to execute addons
2019-04-07 17:01:59 +02:00
Daniel Marjamäki
a3257349b9
astyle formatting
...
[ci skip]
2019-03-17 10:50:06 +01:00
Daniel Marjamäki
c7155a8e08
Removed '--experimental-fast' flag
2019-03-17 08:19:56 +01:00
Daniel Marjamäki
3dc34f1515
Disable all simplified checks
2019-03-16 09:17:50 +01:00
Daniel Marjamäki
4f232e41dd
Add --experimental-fast option
2019-02-09 14:40:50 +01:00
Daniel Marjamäki
bd7790fd8c
Update copyright year
2019-02-09 07:24:06 +01:00
Daniel Marjamäki
23599428cb
Clarify Cppcheck output
2019-02-03 19:49:27 +01:00
Daniel Marjamäki
437800f46d
CLI: Added --max-ctu-depth
2019-02-03 17:51:36 +01:00
Daniel Marjamäki
04d3672bde
Fixed #7203 (Better syntax error, handle array declaration with @)
2019-01-01 09:45:41 +01:00
Daniel Marjamäki
271763e680
CTU: Refactoring
2018-12-25 21:11:23 +01:00
Daniel Marjamäki
c7993df4ff
Refactoring; Use range for loops
2018-12-25 11:47:45 +01:00
Daniel Marjamäki
d97851b9db
change severity for 'unknown macro' to error for now.
2018-11-13 21:08:45 +01:00
Daniel Marjamäki
152be6df63
Report 'unknown macro' as information message with id unknownMacro
2018-11-13 20:14:56 +01:00
Daniel Marjamäki
307a19d17e
Refactoring: Use range for loop
2018-11-05 09:49:28 +01:00
alex
babafd75e3
Added support for -U option to the GUI.
2018-10-09 15:05:05 +02:00
orbitcowboy
e25bf187ad
Attempt to fix regression for pcre_free_study().
2018-09-26 08:07:26 +02:00
orbitcowboy
bdb136de02
PCRE: Fixed unintended message when HAVE_RULES=yes was set.
2018-09-24 09:00:09 +02:00
Daniel Marjamäki
3a007cbcbf
astyle formatting
...
[ci skip]
2018-09-23 17:04:52 +02:00
orbitcowboy
29d7872440
Improvements for PCRE API usage (HAVE_RULES=yes) ( #1384 )
...
* PCRE: added pcre_study to improve regex matching speed.
* PCRE: catch return values from pcre_exec and return an error message in case it fails.
* Formatted the code. There are no functional changes intended.
* PCRE: decode internal PCRE error messages.
* Integrating comments from PR.
* PCRE: Use pcre_study() only in case PCRE_CONFIG_JIT is defined.
* PCRE: Fixed potential resource leak. In case prce_compile worked, but pcre_study() returns an error, the allocated resources by pcre_compile() can be freed.
* Make travis happy.
* PCRE: Improved output message format.
* PCRE: Attempt to be compliant to older PCRE versions and fix travis build.
2018-09-23 14:27:46 +02:00
Daniel Marjamäki
0dfedd977e
CppCheck: Minor tweak. Do no clear internalErrorFound, instead ensure that it's not written upon suppression
2018-09-10 06:02:01 +02:00
Daniel Marjamäki
509cb35168
astyle formatting
...
[ci skip]
2018-09-08 15:19:32 +02:00
tam do thanh
7ad09b44c3
Ticket 7792: Suppression both exit_code and syntaxError when call cppcheck suppressions ( #1345 )
2018-09-08 11:09:49 +02:00
Kevin Kendzia
c5ebf26f9f
cppcheck.cpp: fix suppression of syntaxError ( #1333 )
...
* cppcheck.cpp: fix suppression of syntaxError
* test: add supression test for syntaxError while file read
2018-08-17 10:05:25 +02:00
Daniel Marjamäki
223a116f24
The checksum in analyzer info files will now depend on the suppressions
2018-08-09 09:27:26 +02:00
Daniel Marjamäki
ddbe4b89b5
Renamed --debug to --debug-simplified
2018-08-05 11:19:20 +02:00
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