Oliver Stöneberg
64cd09ab62
fixed #11917 (Default to `native` platform in Windows builds) ( #5428 )
2023-09-11 11:08:23 +02:00
Oliver Stöneberg
91070ca794
utils.h: added `startsWith()` and started using it ( #5381 )
...
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.
2023-09-08 19:30:25 +02:00
Oliver Stöneberg
0901e496ed
refs #3450 (CLI --report-progress is currently useless) - added `--report-progress=<val>` to specify interval ( #5353 )
2023-08-23 11:20:20 +02:00
Oliver Stöneberg
c7f88db90a
CmdLineParser: deprecated `--template <template>` and `--template-location <template>` ( #5331 )
...
Both are bugprone since they just take the next parameter which doesn't
start with `-`.
Also `--template` has not been documented since
17842394c0
back in 2011(!). And
`--template-location` has never been documented since its induction in
f058d9ad08
. That's also why we can have a
short deprecation period.
2023-08-18 11:59:14 +02:00
Ryan M. Lederman
d064f9c243
-j 0 causes indefinite hang. require >= 1 ( #5326 )
...
In cppcheck 2.11.1 (macOS), using `-j 0` actually causes cppcheck to do
nothing–it stalls indefinitely.
I could only find one place where `mSettings.jobs` was validated against
> 0 and it's simply an assert, so you wouldn't hit it in a release
build.
- Require -j >= 1 ✅
- Cap -j at 1024, not 10000 ✅ (I don't even know what would happen if
you created 10,000 threads, but nothing good; likely exhaust virtual
memory or grind the process to a halt). 1024 is still obscene but there
may be some hypercomputers out there that have that many logical cores.
2023-08-14 11:55:32 +02:00
Oliver Stöneberg
693084470d
TestCmdlineParser: fixed some TODO test cases ( #5325 )
2023-08-14 11:37:59 +02:00
Oliver Stöneberg
2b3dec4418
TestCmdlineParser: properly reset settings and parser between tests ( #5310 )
2023-08-12 21:43:12 +02:00
Samuel Poláček
b2511fb3ae
Check if --cppcheck-build-dir exists ( #5254 )
...
Cppcheck does not report that cppcheck build dir does not exist and also
does not report any write issues to the non-existent directory.
This means that cppcheck build dir is actually not used.
We should either create the directory or fail.
2023-08-04 17:38:43 +02:00
Daniel Marjamäki
55af68aaf7
Update type for Settings::checksMaxTime. ( #5205 )
...
It's a time offset not a size. It should not have value SIZE_MAX that
makes it ineffective (overflow in calculation of stop time).
2023-06-28 19:52:33 +02:00
Oliver Stöneberg
2935c855c3
reduced usage of mutable `Settings` objects in tests ( #4798 )
2023-05-02 11:48:24 +02:00
Oliver Stöneberg
5a2c31a41c
CmdLineParser: pass suppressions separately from settings ( #5023 )
2023-04-30 20:56:54 +02:00
Oliver Stöneberg
8cf6a22ea3
cleaned up includes based on `include-what-you-use` ( #5021 )
2023-04-30 07:33:19 +02:00
Oliver Stöneberg
f5e51eace7
do not use string-to-integer conversions without error handling ( #4906 )
2023-04-08 22:29:09 +02:00
Oliver Stöneberg
cfca3a69a2
optimized template string substitutions a bit ( #4840 )
2023-04-08 22:19:52 +02:00
Oliver Stöneberg
30131837b5
refs #11603 - deprecated `--enable=information` implicitly enabling `missingInclude` ( #4865 )
2023-03-09 20:04:20 +01:00
Oliver Stöneberg
d17e804235
made `CmdLineParser::mSettings` a reference ( #4855 )
2023-03-07 12:11:21 +01:00
Oliver Stöneberg
5af6ca6637
made `Platform` a member of `Settings` instead of inheriting from it / cleanups ( #4791 )
2023-03-03 18:36:27 +01:00
Oliver Stöneberg
bd1ae69b00
cleaned up includes based on `include-what-you-use` ( #4599 )
2023-03-02 21:50:14 +01:00
Oliver Stöneberg
14e78e1800
greatly improved error handling in Cppcheck project file parsing / some cleanups ( #4752 )
2023-02-08 20:30:43 +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 ( #4734 )
...
* 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
1d3955bd92
renamed some files in the `test` folder ( #4705 )
2023-01-27 08:18:32 +01:00
Oliver Stöneberg
e5572835c0
fixed `platforms` lookup / set proper platform type for `unix32-unsigned` and `unix64-unsigned` / copy `platforms` in CMake ( #4464 )
2023-01-26 22:05:40 +01:00
Oliver Stöneberg
38abeccd24
added command-line option `--disable=<id>` to disable individual checks ( #4712 )
2023-01-21 10:39:44 +01:00
chrchr-github
11f1a9d1f5
Fix crash on ternary with omitted operand ( #4673 )
...
* Fix MSVC compiler warning
* Fix crash on incomplete ternary operator
* Revert "Fix crash on incomplete ternary operator"
This reverts commit 28df0f0ab6ff794e733617447f847a97c1a7a609.
* Handle ternary with omitted operand
2023-01-02 17:44:17 +01:00
Daniel Marjamäki
bf11cdf299
TestCmdLineParser: Add tests for ignored paths
2023-01-01 15:32:37 +01:00
Oliver Stöneberg
b380fd2589
added command-line option `--valueflow-max-iterations` to control amount of valueflow iterations / also log debug warning when iterations are being exceeded ( #4557 )
2022-12-20 20:51:08 +01:00
Oliver Stöneberg
2cd8bb94e4
some small `CmdLineParser` cleanups and improvements ( #4654 )
2022-12-19 22:28:36 +01:00
Daniel Marjamäki
ad8c1e26f0
dump: output language to dumpfile
2022-11-20 12:30:09 +01:00
Oliver Stöneberg
8126d5c1a6
improved `TestCmdlineParser` ( #4475 )
2022-09-17 18:50:25 +02:00
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
1202efb438
some `--exception-handling` related improvements ( #4368 )
2022-08-20 20:54:31 +02:00
Oliver Stöneberg
8f728cb4b6
added (partial) support for specifying C++23 and support more "-std" options ( #3212 )
2022-04-15 16:17:36 +02:00
Oliver Stöneberg
f32583e097
removed OVERRIDE and FINAL defines and use the keywords directly ( #3767 )
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 ( #3757 )
2022-01-27 19:03:20 +01:00
Oliver Stöneberg
0ba9cb4e64
fixed some unusedFunction warnings ( #3618 )
2022-01-04 15:48:08 +01:00
Paul Fultz II
7f358b2bed
Format with uncrustify ( #3388 )
2021-08-07 20:51:18 +02:00
Paul Fultz II
8dc1fa7a59
Add colors to CLI reporting ( #3304 )
2021-07-08 21:21:35 +02:00
Oliver Stöneberg
6397e29f84
cleaned up includes based on include-what-you-use ( #3141 )
2021-04-03 21:30:50 +02:00
Daniel Marjamäki
42437277dc
Update Copyright year
2021-03-21 20:58:32 +01:00
Daniel Marjamäki
e03851f51c
Fix compilation error
2021-02-24 22:31:46 +01:00
PKEuS
141d2ac215
Refactorization: Improved internal implementation of severity and certainty levels
...
Backported from LCppC.
2021-02-24 22:00:06 +01:00
Falital
2e2d4a0055
Added Hash to plist file names ( #2898 )
2020-11-13 15:52:24 +01:00
Paul Fultz II
eed2e829a7
Revert "Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list." ( #2666 )
...
This reverts commit 187cde183d
.
2020-05-30 11:23:22 +02:00
PKEuS
187cde183d
Cleanup: Removed Tokenizer::simplifyTokenList2. As a side-effect, rules for "simple" token list are now executed on normal token list.
2020-05-29 21:21:07 +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
Oliver Stöneberg
1af959af2c
fixed -Wextra-semi-stmt Clang warnings ( #2553 )
...
* fixed -Wextra-semi-stmt Clang warnings
* adjusted REDIRECT macro to require a semicolon
* testmathlib.cpp: rolled back accidental change
2020-04-21 17:27:51 +02:00