98 Commits

Author SHA1 Message Date
Oliver Stöneberg
bc174c502a
fixed - provided order of source files is not preserved () 2023-11-07 21:21:24 +01:00
Oliver Stöneberg
df860a937d
do not explicitly load windows.cfg during command-line parsing ()
As we now fail early on loading of all libraries we no longer need to
explicitly bail out on mandatory ones. This would have also caused
`libraries` and `library` to go out-of-sync and possibly lead to
duplicated loading of the library. It also allows for a
`CppCheckExecutor` to be made private.
2023-11-04 13:33:10 +01:00
Oliver Stöneberg
ca6d1aafdb
moved fileSettings out of Settings ()
Moved the `FileSettings` out of the `Settings` and pass them around
explicitly. They can never be specified at the same time and are used
exclusively. The code hasn't been fully adjusted to reflect this as this
is only the refactoring without any functional changes.
2023-11-03 23:24:04 +01:00
Oliver Stöneberg
e6d15b17ff
extracted FileSettings from ImportProject to filesettings.h () 2023-11-02 17:42:41 +01:00
Oliver Stöneberg
7086ffaa1b
fixed - print error when using an option which has not been compiled in instead of treating it as non-existent or a no-op ()
Also disabled more internal code around those options and did some
cleanups.
2023-10-21 09:12:59 +02:00
Oliver Stöneberg
0f28f3e493
generate AddonInfo only once ()
Currently the `AddonInfo` is generated and discarded on each addon
invocation. This leads to an unnecessary process invocation for each
addon on each file.

Also if an addon is completely broken we will still perform the whole
analysis only for it to be failed at the end so we should bail out early
if we know it doesn't work at all.
2023-10-08 21:28:57 +02:00
Oliver Stöneberg
a43b55a0ca
Improved addon execution errorhandling () 2023-09-20 10:40:57 +02:00
Daniel Marjamäki
276f017fbe
Partial fix for (Safety: show what checks are enabled/disabled) ()
Example output on stdout:
```
$ ./cppcheck m1.cpp 
Checking m1.cpp ...
Active checkers: 59/177
```
2023-08-29 12:00:52 +02:00
Oliver Stöneberg
33dee83c21
moved suppression-specific code out of ErrorLogger () 2023-08-18 11:55:23 +02:00
Oliver Stöneberg
f1749ab7ad
CppcheckExecutor: use dedicated ErrorLogger for printing error messages XML ()
This starts to untangle the `ErrorLogger` implementation in
`CppcheckExecutor` which handles three different cases and makes things
unnecessarily complicated.
2023-08-08 22:58:02 +02:00
chrchr-github
eee1221738
Use in-class initializers, default constructors, class -> struct () 2023-08-08 11:05:02 +02:00
Daniel Marjamäki
d5fbd552a6
Refactoring: Break out loadLibraries() function. ()
No functional change is intended.

This is a preparation to make qml handling work again
2023-05-01 14:41:14 +02:00
Oliver Stöneberg
9ad26f51e8
removed CppCheck dependency from CppCheckExecutor::parseFromArgs() ()
* made `CppCheck::getErrorMessages()` static

* removed `CppCheck` dependency from `CppCheckExecutor::parseFromArgs()`
2023-04-16 13:54:21 +02:00
Oliver Stöneberg
1f2b49142e
extracted single job execution into SingleExecutor / improved testing / do not unconditionally apply colors to output ()
* added `Settings::useSingleJob()` and use it instead of checking `jobs` or `jointSuppressionReport`

* extracted single job execution into `SingleExecutor`

* moved `reportStatus()` from `CppCheckExecutor` to Èxecutor

* TestSingleExecutor: improved tests

* added testing of markup extension handling in executors

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

* testsingleexecutor.cpp: suppress `performance-unnecessary-value-param` clang-tidy warnings

* ProcessExecutor: send color via pipe instead of applying it beforehand

* do not unconditionally apply colors to output / disable all colors in tests / adjusted tests for changed output behavior

* fixed precision loss in `Executor::reportStatus()`

* fixed `naming-varname` selfcheck warnings
2023-04-08 18:06:38 +02:00
Oliver Stöneberg
ad6c5d80ff
removed unused ErrorLogger::reportInfo() / small *Executor cleanup () 2023-03-04 17:29:34 +01:00
Oliver Stöneberg
b70e1d5461
avoid some unchecked pointer dereferences () 2023-03-02 22:05:41 +01:00
Oliver Stöneberg
8f5f06add7
some Tokenizer construction and related other cleanups () 2023-03-02 21:48:14 +01:00
Daniel Marjamäki
464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Oliver Stöneberg
339484d2a1
mitigated and enabled more clang-tidy warnings ()
* fixed some `performance-inefficient-string-concatenation` clang-tidy warnings

* fixed and enabled `modernize-replace-random-shuffle` clang-tidy warning

* fixed and enabled `bugprone-suspicious-string-compare` clang-tidy warning

* mitigated and enabled `readability-non-const-parameter` clang-tidy warnings

* clang-tidy.md: documented some disabled checks

* mitigated and enabled `performance-unnecessary-value-param` clang-tidy warnings
2022-09-16 18:58:59 +02:00
Oliver Stöneberg
aea4fd1068
some TestSuppressions improvements and cleanups () 2022-07-12 17:36:36 +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
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
f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly () 2022-02-10 23:02:24 +01:00
Daniel Marjamäki
3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg
171da2e6f9
avoid dependency on transitive includes - based on include-what-you-use () 2022-01-27 19:03:20 +01:00
Daniel Marjamäki
872bd44c58 klocwork; CppCheckExecutor has dynamic memory and needs copy constructor and assignment operator 2021-10-28 16:33:15 +02:00
Paul Fultz II
7f358b2bed
Format with uncrustify () 2021-08-07 20:51:18 +02:00
chrchr-github
8cd8b9c64e
Fix MSVC build and some warnings () 2021-07-16 21:55:12 +02:00
Paul Fultz II
8dc1fa7a59
Add colors to CLI reporting () 2021-07-08 21:21:35 +02:00
Daniel Marjamäki
42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
Oliver Stöneberg
0a1012a273
fixed and enabled -Wdocumentation and -Wdocumentation-pedantic clang warnings () 2020-12-27 09:15:59 +01:00
Oliver Stöneberg
9d57b832b8
fixed passedByValue warning hidden by suppression for false positive () 2020-12-24 20:09:11 +01:00
Oliver Stöneberg
37bc0483a4
made check.h less heavy () 2020-05-23 07:16:49 +02:00
Daniel Marjamäki
32e569704b executeCommand in CppCheckExecutor or QCheckThread 2020-05-19 16:04:40 +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 6eec6c4bd53d42e3a1179fd3a8a7dae5a43d4d50.
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
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
4b4f7ea60b Verification; Updated report 2019-12-27 19:05:22 +01:00
Oliver Stöneberg
b5c598cca4 added missing OVERRIDE usage and removed redundant virtual () 2019-09-20 21:57:16 +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
Daniel Marjamäki
bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki
792419a591 Use OVERRIDE macro in cli 2019-01-12 15:42:50 +01:00