1289 Commits

Author SHA1 Message Date
Daniel Marjamäki
2a4d7f7cda daca: use 2.12.0 as old version 2023-09-10 15:28:02 +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
51d1758720
fixed #11930 (Create daca report for valueFlowBailoutIncompleteVar) (#5417)
This provides a report of the top incomplete variables reported by the
ValueFlow analysis. This is based on the implementation of the existing
`--check-library` reports.
2023-09-08 18:08:44 +02:00
Oliver Stöneberg
ce780177b2
fixed #11910 - removed Visual Studio x86 targets from project files and builds from CI (#5397)
Windows XP Pro x64 was released on April 25, 2005 and consumer
processors supporting x86-64 have been around almost as long. Although
there are still 32-bit Windows images available there is not much of a
point maintaining support for these. We also never did any x86 builds
for non-Windows platforms in CI so we don't even know if we work on
those. You might still be able to build 32-bit binaries via CMake.
2023-09-04 19:40:13 +02:00
Daniel Marjamäki
6817113665
Ticket #11897. Write Autosar/Cert C/Cert C++/Misra C++ in the checkers report also. (#5400) 2023-09-03 20:42:09 +02:00
Daniel Marjamäki
44c149e51b
Fix #11897 (Safety: show what checks are enabled/disabled) (#5378)
This primarily adds the corresponding report in the GUI that we have in
the command line already
2023-08-31 18:28:47 +02:00
Daniel Marjamäki
276f017fbe
Partial fix for #11897 (Safety: show what checks are enabled/disabled) (#5372)
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
d8b44dff56
fixed/suppressed several compiler warnings (#5327) 2023-08-16 19:35:53 +02:00
Oliver Stöneberg
4aae670b45
donate-cpu: fixed #11276 (donate-cpu: Improve library detection) / respect --no-upload in "nodata" uploads (#5292)
We were only matching each library once as the entry was removed from
the container stored in the class as we did not modify a copy but a
reference.
2023-08-04 10:30:58 +02:00
Oliver Stöneberg
de0fdc85a2
donate-cpu-server.py: adjusted head information summary name / added internalError to overview (#5283) 2023-08-02 10:43:06 +02:00
Daniel Marjamäki
682bdd3e53
Fix #11813 (daca: script crashes (UnicodeDecodeError) when checking package lgeneral) (#5217) 2023-07-04 19:17:26 +02:00
Daniel Marjamäki
7ff58dacff
daca: filter checker results when there are syntaxError/unknownMacro/etc (#5214) 2023-07-04 13:23:19 +02:00
chrchr-github
f4030c4b1a
Fix #11791 Build regression with GCC 13 (#5193)
Patch supplied by Joachim Reichel.
2023-06-26 11:15:41 +02:00
Daniel Marjamäki
bb2711c22a daca: Update old version to 2.11 2023-06-22 23:17:53 +02:00
Long Radix
c033c62190
Typos and stilistic updates (#5141) 2023-06-14 12:30:45 +02:00
Andrew C Aitchison
0727528876
The threadsafety.py addon now flags MT-Unsafe symbols and functions. (#5086) 2023-06-08 14:46:09 +02:00
Rainer Wiesenfarth
f4f58bf020
Fix #11081 GUI: Windows release build crashes (#5083)
* Fix #11081 GUI: Windows release build crashes

Use generator expressions rather than if statements when adding compiler
options or definitions.

* Fix #11081 GUI: Windows CMake debug build fails with default options

When DISABLE_CRTDBG_MAP_ALLOC is using the default value (OFF), the
debug build of cppcheck-gui fails, as the "realloc" method names in some
of the Qt headers are replaced by the macro defined by the compiler.
Thus DISABLE_CRTDBG_MAP_ALLOC is explicitely set when compiling
cppcheck-gui in Debug mode using MSVC.
2023-06-07 11:33:55 +02:00
Daniel Marjamäki
956bb3ce8c
test-my-pr: use --packages-path if you want to check packages in a path (#5077) 2023-05-23 09:51:51 +02:00
chrchr-github
78182d4773
Fix FN constVariablePointer (#5076)
* Fix FN constVariablePointer

* Fix FP

* Add const

* Fix tests

* Add const
2023-05-22 19:53:51 +02:00
Oliver Stöneberg
e6ae312a0b
moved more code into HAVE_RULES (#4956)
* moved more code into `HAVE_RULES`

* properly enable all internal and rules code in selfcheck

* updated TODOs in selfcheck

* testrunner.vcxproj.filters: updated

* added missing `Debug-PCRE` and `Release-PCRE` configurations for `testrunner` Visual Studio project

* cppcheck.cpp: fixed `useStlAlgorithm` selfcheck warning
2023-05-04 10:54:19 +02:00
Oliver Stöneberg
4807bffdbf
triage_version.py: added --perf to collect performance data in CSV format (#4833)
* removed old timing tracking code

* tools/triage_py/README.md: updated

* triage_version.py: fixed output when when stderr and stdout are not empty

* triage_version.py: added `--perf` to collect performance data in CSV format

* triage_version.py: added TODO about providing additional options

* triage_version.py: added `--start` to specify the first tag/commit to execute
2023-04-30 22:19:04 +02:00
Oliver Stöneberg
9239549598
donate-cpu-server.py: added support for basic information reports / some cleanups (#5014)
* donate-cpu-server.py: bumped version

* donate-cpu-server.py: fixed some PyCharm inspection warnings

* donate-cpu-server.py: use `os.path.join()`

* donate-cpu-server.py: added support for basic `information` reports
2023-04-28 15:33:25 +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
ba168474f2
split templateInstantiation from debug warnings (#4933) 2023-04-08 16:50:11 +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
16a9f54977
donate-cpu-server.py: only use more precise timestamp for logging - will unbreak "Time" columns and stale report (#4909) 2023-04-04 11:37:16 +02:00
Oliver Stöneberg
5ec0ad6bed
use ccache for sanitizer builds / do not use precompiled headers with ccache (#4910)
* 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
fd8a7b9537
ValueFlow: Evaluate if statement for function returns (#4908) 2023-03-24 13:31:26 +01: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
30b3d73229
bisect.sh: make it possible to detect commits which fix scan time regressions / improved documentation (#4863) 2023-03-08 15:00:10 +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
68504a0f51
bisect: handle crashes as "bad" / added hot-patch for 1.88/1.89 compilation failures / added expected output as optional parameter (#4804) 2023-03-02 21:49:05 +01:00
Oliver Stöneberg
514e605598
CI-unixish.yml: fixed and enabled all build steps for macos (#4832) 2023-03-02 20:54:30 +01:00
Oliver Stöneberg
535ab69fa0
triage_version.py: extend template for 1.x versions with error ID (#4801) 2023-02-24 07:02:51 +01:00
Oliver Stöneberg
a846bc2d99
added precompiled header for cli (#4779) 2023-02-08 21:11:11 +01:00
Oliver Stöneberg
41d2d1b0b5
added a script to bisect regressions (#4286) 2023-02-07 21:59:52 +01:00
Oliver Stöneberg
20ff2d7172
donate_cpu_lib.py: use subprocess.check_call() so failed calls will actually raise an exception (#4750) 2023-02-07 21:42:37 +01:00
Rikard Falkeborn
9acc9659aa
test-my-pr robustification (#4756)
* Add try_retry-logic to get_packages_count()

Occasionally, get_packages_count() fails, which is a bit annoying since
it happens after compilation and therefore can take some time to detect.
Add try-retry to the function to make it more robust.

* Move try_retry-logic to lib.get_package()

Moving it to the library means test-my-pr also benefits from it. This
fixes Trac ticket #11405.
2023-01-31 22:39:55 +01:00
Daniel Marjamäki
a64dfbc519 daca: update old version 2023-01-28 14:53:47 +01:00
Daniel Marjamäki
464fbe8d53 Update copyright year 2023-01-28 10:16:34 +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
58de191b99
triage_version.py: specify --platform=native / small cleanup (#4741) 2023-01-26 20:06:12 +01:00
Oliver Stöneberg
41849b1a78
generate *.vcxproj file lists with dmake (#4652) 2023-01-21 11:55:36 +01:00
Oliver Stöneberg
e205550bdb
donate-cpu-server.py: only include packages which crash on head in the crash report package list (#4714) 2023-01-18 20:19:31 +01:00
Oliver Stöneberg
c2de9843ca
donate_cpu_lib.py: use try_retry() in __remove_tree() (#4715) 2023-01-18 17:02:09 +01:00
Oliver Stöneberg
c99c444877
triage_version.py: added --no-quiet, --no-stderr and --no-stdout for more granular output control (#4713) 2023-01-18 17:00:57 +01:00
Armin Müller
a77f0d9403
Typos found by running "codespell" (#4702) 2023-01-10 15:15:27 +01:00
Oliver Stöneberg
cac86ada2b
donate-cpu-server.py: fixed factor calculation when base time is 0.0 (#4671) 2023-01-01 15:28:03 +01:00
Oliver Stöneberg
525181c5aa
triage_version.py: improved error handling of version input and sorting (#4667) 2023-01-01 15:27:21 +01:00
Oliver Stöneberg
d7416bc1e9
donate-cpu-server.py: various improvements - mainly to the time reports (#4670) 2022-12-31 18:10:40 +01:00