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.
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`
This is in preparation of avoiding accessing `std::cout` directly as
well as streamlining and improving the logging during the settings
parsing. There are no functional changes yet.
This makes the code much more readable. It also makes it less prone to
errors because we do not need to specify the length of the string to
match and the returnvalue is clear.
The code with the bad returnvalue check was never executed and I added a
test to show that.
There was no need for the `Tokenizer` parameter to be a pointer as it
could never be `nullptr` and was also dereferenced without checking
first.
As a reference to the `Settings` was already available via the
`Tokenizer` there was no need to pass it separately. In the production
code there will only be one instance of it but in the tests we could
have accidentally passed a different one.
This is a mess. The version is AUR is still outdated and also doesn't
install anymore. Fedora 38 carries the latest version of it so use that
now. Keep the old steps in case we need to switch again in the future.
* 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`
* 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