Commit Graph

1101 Commits

Author SHA1 Message Date
chrchr-github 59b955e014
Suppress deprecation warning with -E () 2023-05-11 14:35:56 +02:00
Daniel Marjamäki e1d5d9988d
Fixed (Add --showtime=file-total option to show checking time of each file) () 2023-05-11 14:04:22 +02:00
Oliver Stöneberg b5ce2c708b
SingleExecutor: process markup files after code when scanning projects ()
* SingleExecutor: added TODOs

* test `SingleExecutor` with files and project

* SingleExecutor: process markup files after code when scanning project

* TestSingleExecutor: generate scoped files before calling executor

* CI-unixish.yml: added `--output-on-failure` to CTest call

* helpers.cpp: improved error reporting in `~ScopedFile()`

* use unique filenames in executor tests to avoid collisions

* fixed `functionStatic` selfcheck warnings
2023-05-03 17:32:28 +02:00
Daniel Marjamäki 07b802fd2a
File lister: Fix possible resource leaks ()
Trac ticket created: 

Found by Coverity: CID 1474932
2023-05-03 16:23:07 +02:00
Daniel Marjamäki 46b9d4ec61
Fixed (Markup support is broken, unused function false positives) () 2023-05-03 11:19:13 +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 5a2c31a41c
CmdLineParser: pass suppressions separately from settings () 2023-04-30 20:56:54 +02:00
Oliver Stöneberg 8cf6a22ea3
cleaned up includes based on `include-what-you-use` () 2023-04-30 07:33:19 +02:00
Oliver Stöneberg b3016f01a1
fixed some CLion inspection warnings ()
* fixed some CLion "Unused global declaration" warnings

* fixed some CLion "Not implemented function" warnings

* fixed some CLion "Unused struct" warnings

* added TODO

* removed unused parameter reported by CLion

* fixed some CLion "Unused macro" warnings

* fixed some CLion "Condition is always true" warnings and a CLion "The value is never used" warning
2023-04-28 16:02:41 +02:00
Oliver Stöneberg 6eae4e71f6
make sure executors are only used in the intended context / `TestSuppressions` cleanups ()
* added asserts to make sure executors are only used in the intended context

* TestSuppressions: specify proper job counts in `checkSuppression*()`

* TestSuppressions: enabled all asserts in `runChecks()`

* TestSuppressions: removed unnecessary setting from `checkSuppression()`

* TestSuppressions: small cleanup in the way tests are called

* TestSuppressions: use `SingleExecutor`
2023-04-28 12:41:53 +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
Daniel Marjamäki 7726a5b5b3
Add a --check-level option () 2023-04-09 13:48:13 +02:00
Oliver Stöneberg f5e51eace7
do not use string-to-integer conversions without error handling () 2023-04-08 22:29:09 +02:00
Oliver Stöneberg cfca3a69a2
optimized template string substitutions a bit () 2023-04-08 22:19:52 +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 5be8eee943
iwyu.yml: use a distro which has the latest `include-what-you-use` / enabled Qt mappings / cleaned up includes () 2023-04-08 16:08:47 +02:00
Daniel Marjamäki 89a95ddc8f --performance-valueflow-max-if-count: review comments 2023-04-08 13:07:28 +02:00
Daniel Marjamäki 2359b9ff82 valueflow: limit valueflow in functions that have many ifs 2023-04-01 20:58:15 +02:00
Oliver Stöneberg 5ec0ad6bed
use `ccache` for sanitizer builds / do not use precompiled headers with `ccache` ()
* added CMake option `DISABLE_DMAKE` to disable `run-dmake` dependencies

* tools/CMakeLists.txt: added TODO

* use `ccache` for sanitizer builds

* aligned selfcheck between sanitizer workflows and disabled some currently unnecessary steps

* CI-unixish.yml: do not use precompiled headers with `ccache`
2023-04-01 09:40:10 +02:00
Paul Fultz II 7231d1cece
Update the isVariableChanged to correctly check the const bit () 2023-03-26 15:12:49 +02:00
Oliver Stöneberg 8148095fe5
cmdlineparser.cpp: fixed compilation () 2023-03-10 00:39:29 +01:00
Oliver Stöneberg 2c05281a31
ThreadExecutor: refactoring in preparation of sharing code () 2023-03-09 20:08:39 +01:00
Oliver Stöneberg 30131837b5
refs - deprecated `--enable=information` implicitly enabling `missingInclude` () 2023-03-09 20:04:20 +01:00
Oliver Stöneberg 87d9c8fbc5
fixed - ProcessExecutor: read the process pipe until we have all the expected data / greatly improved error handling () 2023-03-07 12:25:49 +01:00
Oliver Stöneberg d17e804235
made `CmdLineParser::mSettings` a reference () 2023-03-07 12:11:21 +01:00
Oleksandr Redko 0719a57ca8
cli: correct typo in help message () 2023-03-06 11:25:07 +01:00
Oliver Stöneberg ad6c5d80ff
removed unused `ErrorLogger::reportInfo()` / small `*Executor` cleanup () 2023-03-04 17:29:34 +01:00
Daniel Marjamäki 340baf10cd
Adjust version 2.11.99 => 2.10.99 () 2023-03-04 17:19:31 +01:00
Oliver Stöneberg a00b6e1f8a
simplified `ThreadExecutor` class by moving some code out of it / fixed some thread safety issues () 2023-03-04 12:05:17 +01:00
Oliver Stöneberg 7fd4118d60
Fix (integrate `--check-config` include findings with normal analysis) / also fixes () 2023-03-04 09:02:35 +01:00
Oliver Stöneberg 0ec2d84f1a
optimized suppression lookups a bit when no suppressions exist () 2023-03-03 18:37:09 +01:00
Oliver Stöneberg 5af6ca6637
made `Platform` a member of `Settings` instead of inheriting from it / cleanups () 2023-03-03 18:36:27 +01:00
Oliver Stöneberg b70e1d5461
avoid some unchecked pointer dereferences () 2023-03-02 22:05:41 +01:00
Oliver Stöneberg bd1ae69b00
cleaned up includes based on `include-what-you-use` () 2023-03-02 21:50:14 +01:00
Oliver Stöneberg 8f5f06add7
some `Tokenizer` construction and related other cleanups () 2023-03-02 21:48:14 +01:00
Oliver Stöneberg a846bc2d99
added precompiled header for `cli` () 2023-02-08 21:11:11 +01:00
Oliver Stöneberg 8ef14dad98
fixed and enabled `performance-faster-string-find` clang-tidy warning () 2023-02-08 21:01:51 +01:00
Oliver Stöneberg 14e78e1800
greatly improved error handling in Cppcheck project file parsing / some cleanups () 2023-02-08 20:30:43 +01:00
Oliver Stöneberg 1a460d7bc0
bumped version to 2.11 () 2023-01-29 15:18:22 +01:00
Daniel Marjamäki 464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Oliver Stöneberg f16ffd88e9
deprecate non-`native` platform being used by default in Windows builds ()
* deprecate non-`native` platform being used by default in Windows builds

* test-helloworld.py: avoid deprecation warnings
2023-01-27 10:46:48 +01:00
Oliver Stöneberg fd15811215
de-coupled `--check-library` from `information` severity and other dependencies () 2023-01-26 22:28:04 +01:00
Oliver Stöneberg a0b1285f4a
added CMake option `BUILD_CORE_DLL` to build lib as `cppcheck-core.dll` with Visual Studio () 2023-01-26 22:13:07 +01:00
Oliver Stöneberg e5572835c0
fixed `platforms` lookup / set proper platform type for `unix32-unsigned` and `unix64-unsigned` / copy `platforms` in CMake () 2023-01-26 22:05:40 +01:00
Oliver Stöneberg 41849b1a78
generate `*.vcxproj` file lists with `dmake` () 2023-01-21 11:55:36 +01:00
Oliver Stöneberg 38abeccd24
added command-line option `--disable=<id>` to disable individual checks () 2023-01-21 10:39:44 +01:00
chrchr-github 50d297b309
Enable useStlAlgorithm in selfcheck () 2023-01-17 20:48:26 +01:00
Oliver Stöneberg 124668979c
replaced some `std::ostringstream` usage with `std::to_string()` () 2023-01-16 22:05:33 +01:00
Oliver Stöneberg 0c95971c54
added .gitattributes and normalized files () 2022-12-30 21:33:45 +01:00
Oliver Stöneberg d3a2cdc26c
converted (undocumented) define `MAXTIME` into (undocumented) command-line options `--checks-max-time=`, `--template-max-time=` and `--typedef-max-time=` () 2022-12-30 21:21:05 +01:00