Oliver Stöneberg
ca6d1aafdb
moved `fileSettings` out of `Settings` ( #5608 )
...
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` ( #5604 )
2023-11-02 17:42:41 +01:00
Oliver Stöneberg
dd627a2b1d
moved `ImportProject` out of `Settings` and only store `fileSettings` ( #5603 )
...
`ImportProject` is not needed outside of the command-line parsing so we
do not need it inside the `Settings` at all. We only use the
`fileSettings` in the executors.
2023-11-01 21:08:30 +01:00
Oliver Stöneberg
06b5ef1e4d
cleaned up includes based on include-what-you-use ( #5532 )
2023-10-09 10:07:20 +02:00
Oliver Stöneberg
8dee551cad
added testing of clang-tidy invocation to executor tests / also some cleanups ( #5514 )
2023-10-08 09:06:02 +02:00
Oliver Stöneberg
fc700b68eb
refs #4452 / refs #11705 - improved `--showtime=` behavior and testing ( #4876 )
...
This is a step onto leveraging the `ThreadExecutor` implementation for
`ProcessExecutor` which is a follow-up to #4870 . We need to have the
proper test coverage and the existing implementations working as
expected before we move to the shared code.
Fixes:
- added `--showtime=` tests for all executor implementations
- only print `--showtime=summary` once at the end
- prevents `--showtime=` by multiple threads to be written at the same
time - essentially breaking the output
- reset the timer results before each test
- deprecated `top5` in favor of `top5_file`
- fixed printing for all executors except `ProcessExecutor`
2023-10-05 19:04:06 +02:00
Oliver Stöneberg
84a9b3a5f2
enabled and mitigated `modernize-use-equals-default` clang-tidy warnings / removed unnecessary default destructors ( #5335 )
2023-08-16 17:13:36 +02:00
chrchr-github
eee1221738
Use in-class initializers, default constructors, class -> struct ( #4842 )
2023-08-08 11:05:02 +02:00
Oliver Stöneberg
988edd24c2
TestSingleExecutor: test clang-tidy invocation ( #5294 )
2023-08-07 20:47:24 +02:00
Oliver Stöneberg
a17f6e89d1
pass `Suppressions` separately from `const Settings` into executors ( #5278 )
2023-08-07 18:39:57 +02:00
Oliver Stöneberg
6eae4e71f6
make sure executors are only used in the intended context / `TestSuppressions` cleanups ( #4963 )
...
* 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
1f2b49142e
extracted single job execution into `SingleExecutor` / improved testing / do not unconditionally apply colors to output ( #4882 )
...
* 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 ( #4885 )
2023-04-08 16:08:47 +02:00
Oliver Stöneberg
2c05281a31
ThreadExecutor: refactoring in preparation of sharing code ( #4870 )
2023-03-09 20:08:39 +01:00
Oliver Stöneberg
ad6c5d80ff
removed unused `ErrorLogger::reportInfo()` / small `*Executor` cleanup ( #4852 )
2023-03-04 17:29:34 +01:00
Oliver Stöneberg
a00b6e1f8a
simplified `ThreadExecutor` class by moving some code out of it / fixed some thread safety issues ( #4849 )
2023-03-04 12:05:17 +01:00
Oliver Stöneberg
0ec2d84f1a
optimized suppression lookups a bit when no suppressions exist ( #4839 )
2023-03-03 18:37:09 +01:00
Daniel Marjamäki
464fbe8d53
Update copyright year
2023-01-28 10:16:34 +01:00
Oliver Stöneberg
1cfe49e340
use `const_iterator` where possible ( #4662 )
2022-12-30 15:13:47 +01:00
chrchr-github
3273e51fd5
Fix #10412 FN useStlAlgorithm with iterators ( #4157 )
2022-10-16 13:46:26 +02:00
Oliver Stöneberg
76d1b9f31a
avoid unnecessary copies with `emplace_back()` ( #4450 )
...
* avoid unnecessary copies with `emplace_back()`
* cmdlineparser.cpp: suppress `accessMoved` selfcheck false positives
2022-09-10 11:25:15 +02:00
Oliver Stöneberg
b51aea5531
separated process execution code into `ProcessExecutor` ( #4249 )
2022-07-08 16:42:57 +02:00
Oliver Stöneberg
412054e83a
enabled and mitigated `misc-unused-using-decls` clang-tidy warnings ( #3543 )
2022-06-04 16:39:25 +02:00
Oliver Stöneberg
5e6cc1053a
small `ErrorLogger` usage cleanups ( #4033 )
2022-04-21 21:30:22 +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
Paul Fultz II
dad10f2ab7
Fix 7684: ValueFlow: function call 'X::GetSize()' ( #3984 )
...
* Improve getting function to calculate the return
* Add test
* Format
* Move to cpp to avoid FP
* Format
2022-04-07 06:49:25 +02:00
Oliver Stöneberg
de728f472c
removed ThreadExecutor::addFileContent() ( #3865 )
2022-03-02 11:10:29 +01:00
Oliver Stöneberg
51371f7929
added CMake option USE_THREADS to be able to use threads instead of fork() / cleanups ( #3852 )
2022-02-23 09:04:35 +01:00
Oliver Stöneberg
b886b64b1a
de-coupled ErrorLogger interface from ThreadExecutor ( #3849 )
2022-02-22 09:54:35 +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
Oliver Stöneberg
55ff684f34
added unusedFunction self check to CI / cleanups ( #3526 )
2022-01-18 22:02:25 +01:00
Oliver Stöneberg
ba777b54d1
prevent uncaught exception in ThreadExecutor::handleRead() ( #3514 )
2021-10-20 20:41:42 +02:00
chrchr-github
d9b6940070
Cleanup: unnecessary includes, fix include order, fix unreferenced va… ( #3418 )
2021-08-26 19:36:31 +02:00
chrchr-github
5868d01e80
THREADING_MODEL_WIN: replace Win32 API calls with std::async, std::mutex ( #3408 )
2021-08-24 20:39:43 +02:00
chrchr-github
187d45a8df
THREADING_MODEL_WIN: Create a new CppCheck object for every file to be analysed in multi-thread mode. This fixes existing .a1 files not getting used due to changing hashes (caused by suppressions from previous files) and matches the behavior in THREADING_MODEL_FORK. ( #3405 )
2021-08-17 20:51:31 +02:00
Paul Fultz II
7f358b2bed
Format with uncrustify ( #3388 )
2021-08-07 20:51:18 +02:00
Coldfirex
3312a9f934
Add support for Haiku ( #3342 )
...
* Update cppcheckexecutor.cpp
* Update threadexecutor.cpp
2021-07-20 11:04:20 +02:00
Paul Fultz II
8dc1fa7a59
Add colors to CLI reporting ( #3304 )
2021-07-08 21:21:35 +02:00
Daniel Marjamäki
42437277dc
Update Copyright year
2021-03-21 20:58:32 +01:00
Daniel Marjamäki
849ea6b3c8
Fix compilation errors
2021-02-24 22:12:48 +01:00
Oliver Stöneberg
c94713c607
improved error handling in ThreadExecutor ( #3023 )
2021-01-13 12:41:59 +01:00
Oliver Stöneberg
fbf5858f76
fixed and enabled several clang-tidy warnings ( #2816 )
2021-01-02 19:10:25 +01:00
Oliver Stöneberg
097abe013d
perform all tasks in each loop execution in ThreadExecutor::check() ( #2932 )
2020-12-04 08:07:14 +01:00
Daniel Marjamäki
894b79227d
Revert "Revert "fixed excessive spawning of child processes / fixed potential zombie processes ( #2924 )""
...
This reverts commit 5650897a4b
.
2020-12-03 18:06:18 +01:00
Daniel Marjamäki
5650897a4b
Revert "fixed excessive spawning of child processes / fixed potential zombie processes ( #2924 )"
...
This reverts commit 873aa075b4
.
There was performance issues.
2020-12-03 12:25:59 +01:00
Oliver Stöneberg
873aa075b4
fixed excessive spawning of child processes / fixed potential zombie processes ( #2924 )
2020-11-29 14:59:09 +01:00
Oliver Stöneberg
37bc0483a4
made check.h less heavy ( #2633 )
2020-05-23 07:16:49 +02:00
Daniel Marjamäki
5a0b5139a0
Fix compile error in windows
2020-05-19 22:13:46 +02:00