Commit Graph

343 Commits

Author SHA1 Message Date
Oliver Stöneberg b3ec225480
iwyu.yml: use `debian:unstable` to always get latest include-what-you-use / cleaned up includes (#4466)
* iwyu.yml: use debian:unstable to always get latest include-what-you-use

* cleaned up includes based on include-what-you-use

* mitigated include-what-you-use false positives
2022-09-16 07:15:49 +02:00
Oliver Stöneberg 16f598c409
added missing `sstream` includes (#4381) 2022-08-19 10:16:23 +02:00
Oliver Stöneberg 31d704e4bc
cppcheckexecutor.cpp: extracted platform-dependent code into separate files (#4359) 2022-08-16 22:03:44 +02:00
Oliver Stöneberg 4bf5dcd29f
cleaned up includes based on include-what-you-use (#4358)
* cleaned up includes based on include-what-you-use

* testlibrary.cpp: no need for `empyString` optimization
2022-08-14 12:44:19 +02:00
Daniel Marjamäki fa5fd9cae0 Fixed #11172 (Unmatched suppression for inline suppression even though --suppress=unmatchedSuppression is used) 2022-07-12 22:51:26 +02:00
Oliver Stöneberg aea4fd1068
some `TestSuppressions` improvements and cleanups (#4271) 2022-07-12 17:36:36 +02:00
Oliver Stöneberg c9c1f83a69
use `emptyString` more consistently (#4034) 2022-07-10 10:57:29 +02:00
Oliver Stöneberg c36320747f
some `missingInclude`/`missingIncludeSystem` fixes and tests (#4027)
* do not emit `missingInclude` and `missingIncludeSystem` errors when not enabled / fixed and improved TestPreprocessor::inline_suppression_for_missing_include()

* testpreprocessor.cpp: added missing tests for `missingInclude` and `missingIncludeSystem`

* cppcheckexecutor.cpp: `missingIncludeSystem` was not emitted in normal analysis if `missingInclude` existed

* dmake

* added `run-dmake` as `testrunner` dependency
2022-07-09 23:21:11 +02:00
Oliver Stöneberg b51aea5531
separated process execution code into `ProcessExecutor` (#4249) 2022-07-08 16:42:57 +02:00
Daniel Marjamäki d1812c8022 Cppcheck: Write product name if provided in xml output 2022-07-07 17:35:13 +02:00
Daniel Marjamäki 8f386e15fd Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
Daniel Marjamäki 4365704f14 cppcheck.cfg: support custom productname and about message 2022-03-24 22:44:47 +01:00
Daniel Marjamäki 1fe7cd348a exename: Set proper exename when cppcheck is executed from PATH and argv[0] does not contain path information 2022-03-21 18:35:53 +01:00
Oliver Stöneberg 6e57cc4323
small utils.h cleanup (#3821) 2022-02-11 19:44:08 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 8f7770f512
added an include-what-you-use GitHub Action (#3759) 2022-02-01 17:19:19 +01:00
Oliver Stöneberg 171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use (#3757) 2022-01-27 19:03:20 +01:00
Leon De Andrade 5b52f4946a
Implement support for passing multiple file filters (#3479) 2021-11-23 22:51:45 +01:00
DGarry82 e13eba86e5
use lowercase header filenames with MinGW toolchain (#3489) 2021-10-09 14:49:33 +02:00
chrchr-github d9b6940070
Cleanup: unnecessary includes, fix include order, fix unreferenced va… (#3418) 2021-08-26 19:36:31 +02:00
Paul Fultz II 7f358b2bed
Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
Lauri Nurmi 8869ee3554
Fix compilation with recent glibc where SIGSTKSZ is not constant. (#3378) 2021-08-04 07:45:50 +02:00
Coldfirex 3312a9f934
Add support for Haiku (#3342)
* Update cppcheckexecutor.cpp

* Update threadexecutor.cpp
2021-07-20 11:04:20 +02:00
chrchr-github 8cd8b9c64e
Fix MSVC build and some warnings (#3334) 2021-07-16 21:55:12 +02:00
Paul Fultz II 8dc1fa7a59
Add colors to CLI reporting (#3304) 2021-07-08 21:21:35 +02:00
Ken-Patrick Lehrmann 5768c3a726
Check stat return value in addFiles2 (#3214) 2021-04-18 21:52:14 +02:00
Daniel Marjamäki 93873be81a Cppcheck CLI; Better filtering of duplicate XML results when no -j is used 2021-04-05 20:09:45 +02:00
Daniel Marjamäki 42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
PKEuS 141d2ac215 Refactorization: Improved internal implementation of severity and certainty levels
Backported from LCppC.
2021-02-24 22:00:06 +01:00
Oliver Stöneberg ac7647fcd8
some self-check suppression cleanups (#3032) 2021-01-09 20:32:38 +01:00
Rikard Falkeborn bedf3118ef
library: Refactor to use enum class (#3026) 2021-01-08 10:29:01 +01:00
Oliver Stöneberg a7f0e91539
cppcheckexecutor.cpp: fixed stack-use-after-scope reported by ASAN (#3018) 2021-01-06 11:39:24 +01:00
Oliver Stöneberg 96704c9971
fixed and enabled some more clang-tidy warnings (#3007) 2021-01-05 17:51:32 +01:00
Oliver Stöneberg 9d57b832b8
fixed passedByValue warning hidden by suppression for false positive (#2974) 2020-12-24 20:09:11 +01:00
Daniel Marjamäki a493e17a6a Tweaks to use summaries in GUI 2020-12-19 20:46:00 +01:00
Daniel Marjamäki 96caaedbd5 Generate basic function summaries 2020-12-19 19:02:42 +01:00
Daniel Marjamäki dc6f0740c1 CLI: fix execute command, quote argument that contains spaces 2020-08-30 20:02:18 +02:00
Georgy Komarov c5369b84e1
Prevent copying in range-based for loops (#2751)
Use reference types in range for loops to prevent copying.
2020-08-23 20:53:44 +02:00
Oliver Stöneberg 37bc0483a4
made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
Daniel Marjamäki 299e11c991 Fixed Cppcheck warnings 2020-05-19 21:55:28 +02:00
Daniel Marjamäki 32e569704b executeCommand in CppCheckExecutor or QCheckThread 2020-05-19 16:04:40 +02:00
PKEuS e9318d7bfc Refactorization: Avoid creating a temporary string 2020-05-19 08:35:12 +02:00
PKEuS e92a95150a Refactorization: Use emplace methods in CLI 2020-05-19 08:35:12 +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 9f76fcf5f1 Fixed Cppcheck warning 2020-05-09 14:45:47 +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
Mathias Buhr 60ada656a0
Allow filtering when using --project (#2522) 2020-02-09 10:51:29 +01:00
Daniel Marjamäki fb38e87bf4 astyle formatting
[ci skip]
2020-01-31 14:13:52 +01:00
fuzzelhjb d82da987e5
Support clang tidy (#2486) 2020-01-30 07:14:17 +01:00
Aleksandr Serbin 11993ed999 Ticket 5607: Allow to exclude folders with glob pattern (#2498) 2020-01-24 07:06:09 +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 e78775fac3 astyle formatting
[ci skip]
2020-01-10 11:31:12 +01:00
fuzzelhjb fcd5cda97f Check selected files from project (#2378) 2020-01-10 08:57:37 +01:00
Daniel Marjamäki 49ed1a82b4 Verification; save report in custom file 2019-12-27 19:25:06 +01:00
Daniel Marjamäki 4b4f7ea60b Verification; Updated report 2019-12-27 19:05:22 +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
Oliver Stöneberg 9028b4a81d do not access static methods through instance (#2189) 2019-09-20 21:54:30 +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 7e3626c84e Travis: Check the naming conventions again 2019-07-15 20:58:07 +02:00
Daniel Marjamäki 96a1c6dec5 Rename errorlist=>mShowAllErrors 2019-07-15 18:31:12 +02:00
Daniel Marjamäki a6194b81aa Rename _errorList=>mShownErrors 2019-07-15 18:29:09 +02:00
Daniel Marjamäki 5037ad3d42 Rename _settings=>mSettings 2019-07-15 18:24:27 +02:00
Daniel Marjamäki 0fa8a51815 Rename variable _files=>mFiles 2019-07-15 18:21:52 +02:00
Daniel Marjamäki 122ae198b7 Rename errorOutput=>mErrorOutput 2019-07-15 18:16:07 +02:00
Daniel Marjamäki 876d8c9829 Rename member variable exceptionOutput=>mExceptionOutput 2019-07-15 18:11:26 +02:00
Scott Furry a195477470 Correct Zero/Null as pointer constant (#1938)
Building with enhanced clang warnings indicated a large number of
instances with the warning:

`warning: zero as null pointer constant`

Recommended practice in C++11 is to use `nullptr` as value for
a NULL or empty pointer value. All instances where this warning
was encountered were corrected in this commit.

Where warning was encountered in dependency code (i.e. external library)
no chnages were made. Patching will be offered upstream.
2019-06-30 21:39:22 +02:00
Daniel Marjamäki a0dd853642 analyzing one vs config (first debug config that matches platform) 2019-04-13 20:01:40 +02:00
Daniel Marjamäki cb06aebdab Removed --std=posix. From now on, if you use --library=posix then the posix checks will be enabled. 2019-04-12 06:47:28 +02:00
Daniel Marjamäki c04cc02ee5 Refactoring; Use range for loop 2019-04-07 12:07:47 +02:00
Sebastian 08d41ab8af
Load std.cfg before all other libraries (#1740)
- CLI: Save the libraries that should be loaded to a list and load them
after the std.cfg has been loaded.
- GUI: Load std.cfg (and windows.cfg / posix.cfg when applicable) before
setting other options and loading the other libraries.
In the project-file-dialog the std.cfg is searched first. If some
other library fails to load is is retried with first loading std.cfg.
- boost.cfg: Enable containers that depend on std containers.
2019-03-15 06:59:37 +01:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki d35a26c6f0 --check-library fix 2019-01-22 19:40:39 +01:00
Daniel Marjamäki 4119cfd3d1 Correct exit code when there are no unmatched suppressions 2019-01-21 20:33:22 +01:00
Daniel Marjamäki 0f19dfea82 Do not check unmatched suppressions in --check-library checking 2019-01-20 10:30:38 +01:00
Daniel Marjamäki 0945e827c6 Fixed #8931 (Missing error exitcode when an unmatched suppression is detected) 2019-01-19 21:42:01 +01:00
Daniel Marjamäki ade18d978a Inline suppression for knownConditionTrueFalse FP 2019-01-13 13:18:35 +01:00
Daniel Marjamäki 900e26f651 Fix Cppcheck warning
[ci skip]
2019-01-13 13:06:51 +01:00
Sebastian b51f19d530
Fix some doxygen warnings/issues in the comments (#1537) 2018-12-21 21:23:03 +01:00
Daniel Marjamäki 7c5058a42d Refactoring. Rename methods 2018-04-23 12:39:47 +02:00
Daniel Marjamäki f058d9ad08 CLI: Added more fields for --template and added a new --template-location. The gcc predefined template now matches latest gcc better. 2018-04-23 12:21:18 +02:00
PKEuS e2002db78d Replaced make_container by C++11 initializer lists 2018-04-08 23:03:44 +02:00
jrp2014 c2e54fa87f Refactor cli/cppcheckexecutor.cpp 2018-04-05 08:12:15 +02:00
jrp2014 b813a6d407 Refactoring 2018-04-04 21:11:23 +02:00
jrp2014 07b5afcdc6 Improve constness 2018-04-04 21:02:13 +02:00
amai dab99e83cd (Re-)Enable exception handling on cygwin 2018-04-03 00:41:13 +02:00
Daniel Marjamäki 25ef18ab11 astyle formatting
[ci skip]
2018-03-22 07:14:01 +01:00
amai2012 ab02595be1 Improve debug output in case of SIGABRT (add hint about assertion) and small refactoring 2018-03-20 14:24:45 +01:00
orbitcowboy 50844aa7fc checkType: Take into account the size of char. 2018-02-18 14:28:48 +01:00
Daniel Marjamäki db274e8308 Fix testrunner in cygwin 2018-02-10 15:34:49 +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
Dmitry-Me 93e5140945 Better variable names 2017-10-14 23:05:58 +03:00
Oleksandr Redko 2bee664ec9 Return non-const object to enable move compiler optimization (#966) 2017-10-03 18:24:18 +02:00
Ayaz Salikhov 2604156fe7 Use C++ headers (#949) 2017-09-07 13:02:44 +02:00
Daniel Marjamäki 1a1f2069e9 astyle formatting
[ci skip]
2017-08-30 17:42:04 +02:00
Dmitry-Me 9d41b272a1 Brace macro parameter 2017-08-29 21:23:45 +03:00
Dmitry-Me 6f0d5aaee3 Adapt to cases when conversion is a no-op 2017-08-29 21:21:48 +03:00