Oliver Stöneberg
fb37137216
extended the --clang command-line option so you can specify a custom … ( #2734 )
2020-09-06 07:46:51 +02:00
Daniel Marjamäki
7d01ad5b50
add test-clang-import that compares symboldatabases
2020-09-04 15:29:19 +02:00
Daniel Marjamäki
d23fd26ce0
Cppcheck: Try to fix addon problems when paths have spaces
2020-08-30 18:15:48 +02:00
Daniel Marjamäki
0583763cc6
Fixed #3088 (False positive: Dont report "struct or union member is never used" for structs with __attribute__((packed)) or #pragma pack(push))
2020-06-30 11:00:40 +02:00
Paul Fultz II
eed2e829a7
Revert "Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list." ( #2666 )
...
This reverts commit 187cde183d
.
2020-05-30 11:23:22 +02:00
PKEuS
187cde183d
Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list.
2020-05-29 21:21:07 +02:00
Daniel Marjamäki
eb9576cdf8
CLI: 'simple' rules are deprecated, support will be removed in Cppcheck-2.5
2020-05-29 14:20:46 +02:00
Daniel Marjamäki
208e2c7fdf
Clang parser; only set cpp std if path is c++
2020-05-27 21:06:27 +02:00
Daniel Marjamäki
60c7b66636
Clang import; do not use FileSettings::cppcheckDefines() when Clang parser is used
2020-05-26 20:46:41 +02:00
Daniel Marjamäki
d70911c801
ImportProject: Read --std settings from vcxproj file
2020-05-25 21:43:24 +02:00
Daniel Marjamäki
31324573fa
Clang import; Update ast dump flags. Use -Xclang.
2020-05-24 10:52:43 +02:00
Daniel Marjamäki
4e2f8d5d48
astyle formatting
...
[ci skip]
2020-05-23 07:30:22 +02:00
Oliver Stöneberg
37bc0483a4
made check.h less heavy ( #2633 )
2020-05-23 07:16:49 +02:00
Ken-Patrick Lehrmann
79d3f488da
Pass defines flags when calling clang ( #2651 )
2020-05-20 14:56:55 +02:00
Daniel Marjamäki
64291c6b61
fix Clang execution
2020-05-19 19:17:23 +02:00
Daniel Marjamäki
32e569704b
executeCommand in CppCheckExecutor or QCheckThread
2020-05-19 16:04:40 +02:00
PKEuS
c9d8f607df
Optimization: Reduced peak memory usage (30% in my test case) by immediately deleting simplecpp::TokenList while creating the cppcheck TokenList.
2020-05-19 12:08:17 +02:00
Daniel Marjamäki
37646c9ffb
revert accidental mode changes
2020-05-19 10:05:14 +02:00
PKEuS
f0ac0c8675
Optimization: Remove simplecpp::TokenList as soon as cppecheck TokenList was created. This saves memory while checks are running (20% in my test case), although not peak memory
2020-05-19 08:41:05 +02:00
Daniel Marjamäki
65e9f6210c
CLI: Tweak execution of python addons
2020-05-19 08:14:56 +02:00
Daniel Marjamäki
f6f489ea49
Try to make AppVeyor happy
2020-05-18 09:51:47 +02:00
Daniel Marjamäki
aa7a4b8372
Try to make AppVeyor happy
2020-05-18 08:24:17 +02:00
Daniel Marjamäki
a0f2fda53a
Addons: If normal python fails, try 'python'
2020-05-18 07:44:46 +02:00
Daniel Marjamäki
2ef538c171
Tweak paths when executing addons in Cppcheck
2020-05-17 21:45:37 +02:00
Daniel Marjamäki
547d1b158e
Fixed #9723 (GUI: inline suppressions does not work for addons)
2020-05-17 16:50:13 +02:00
Daniel Marjamäki
08ddd84780
Update copyright year
2020-05-10 11:16:32 +02:00
Daniel Marjamäki
3e0218299b
Revert "Update copyright year"
...
This reverts commit 6eec6c4bd5
.
2020-05-10 11:13:05 +02:00
Daniel Marjamäki
6eec6c4bd5
Update copyright year
2020-05-10 11:11:34 +02:00
Daniel Marjamäki
387f0a268b
Clang import: Better bailout for syntax errors when build dir is not used
2020-04-22 10:27:44 +02:00
Daniel Marjamäki
05dcb9a435
Clang import; Allow Clang import without a Cppcheck build dir
2020-04-21 22:26:34 +02:00
Oliver Stöneberg
2c1e36e63e
cleaned up includes based on include-what-you-use ( #2600 )
...
* cleaned up includes based on include-what-you-use
* check.h: trying to work around Visual Studio 2012 bug
* fixed Visual Studio compilation
2020-04-13 13:44:48 +02:00
Daniel Marjamäki
e1543587e0
Clang import; Bailout if clang reports error message
2020-04-13 12:52:24 +02:00
Daniel Marjamäki
189cf29597
astyle formatting
...
[ci skip]
2020-04-05 10:57:51 +02:00
Sam Lane
60f9fefcd4
Add Support For Configuring Addon Python Interpreter Version ( #2591 )
2020-04-05 10:57:28 +02:00
Daniel Marjamäki
a9f55f4985
CLI: add -isystem include paths when running Clang
2020-02-02 16:35:42 +01:00
Daniel Marjamäki
894497e704
CLI: Checking imported project with clang
2020-02-02 14:36:33 +01:00
Daniel Marjamäki
632dc0f141
GUI: Select parser; Cppcheck or Clang
2020-02-02 10:45:42 +01:00
Daniel Marjamäki
fb38e87bf4
astyle formatting
...
[ci skip]
2020-01-31 14:13:52 +01:00
fuzzelhjb
b0ce3e4c0c
Support clang tidy ( #2512 )
2020-01-31 14:10:27 +01:00
fuzzelhjb
d82da987e5
Support clang tidy ( #2486 )
2020-01-30 07:14:17 +01:00
Daniel Marjamäki
37f4ec5bbe
Clang import; Write error message when Clang is not in path
2020-01-27 18:26:17 +01:00
Daniel Marjamäki
b6833b525f
Clang import
2020-01-25 17:01:17 +01:00
Daniel Marjamäki
6beadd9eb9
Restore cppcheck.cpp
2020-01-25 16:14:56 +01:00
Daniel Marjamäki
f911495db3
Clang import; Handle clang-9 while loop better
2020-01-25 16:10:13 +01:00
Daniel Marjamäki
0929c3cced
Cleanup code, CppCheck::checkNormalTokens executes the bug hunting code
2020-01-24 20:37:24 +01:00
Daniel Marjamäki
7db54bde6f
Run normal checks on --clang output
2020-01-24 18:04:39 +01:00
Daniel Marjamäki
bdc621b7a3
Clang import; MaterializeTemporaryExpr
2020-01-20 21:27:49 +01:00
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