69 Commits

Author SHA1 Message Date
Oliver Stöneberg
d0d56cd5ce
removed deprecated platform type Unspecified (#5903) 2024-01-22 10:28:29 +01:00
Oliver Stöneberg
c9259b2ac3
added --template=simple (#5879)
It was already used in several places and I need it in some test
cleanups I am currently working on.
2024-01-16 12:15:21 +01:00
Oliver Stöneberg
93a53af168
modernized and cleaned up CMake files / explicitly check for CMake 3.13 with Visual Studio (#5825) 2024-01-05 11:07:16 +01:00
Oliver Stöneberg
615e4c01c4
bumped minimum requirements to GCC 5.1 / Clang 3.5 / Visual Studio 2015 / CMake 3.5 (#5398)
The current versions only have partial C++11 support which fortunately
has caused us only few issues so far but it would be good to finally
have fully working C++11 support. This also gets rid of several CI
builds on very outdated platforms.

The outdated platforms were used to also test CMake 2.8 but as future
versions of CMake will drop combability with CMake < 3.5 this is a good
time to also drop that requirement on our part.

This PR does not remove or update any outdated code.
2024-01-04 21:31:08 +01:00
Oliver Stöneberg
dd869cf808
added CMake option EXTERNALS_AS_SYSTEM to treat external includes as SYSTEM ones (#5386)
Although these files are part of our repo changes are being done via
their original projects so it might make sense to treat these as system
includes for some people instead of local ones.

Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
2024-01-03 11:05:32 +01:00
Daniel Marjamäki
d81c69682c
releasenotes.txt: new notes for 2.14 [ci skip] (#5787) 2023-12-20 22:19:37 +01:00
Daniel Marjamäki
49da3e3821
Fixed #12281 (IDE plugin integration is broken by checkers report) (#5779) 2023-12-19 15:55:29 +01:00
Daniel Marjamäki
5aa1710dd0
Fix #12071 (Add safety mode that makes cppcheck more strict about critical errors) (#5777) 2023-12-18 18:26:23 +01:00
Daniel Marjamäki
2932ab7592
Revert "Fixed #12071 (suppressing critical error, no indication to user that analysis of file fails) (#5771)" (#5775)
This reverts commit 7c316fb76ddb0a7226c4467dc4b76763eeb8bb70.
2023-12-17 19:13:14 +01:00
Daniel Marjamäki
7c316fb76d
Fixed #12071 (suppressing critical error, no indication to user that analysis of file fails) (#5771) 2023-12-17 15:42:17 +01:00
Oliver Stöneberg
7c456ac1f7
updated releasenotes.txt [skip ci] (#5702) 2023-12-11 15:40:14 +01:00
chrchr-github
735831fc54
Update releasenotes.txt [skip ci] (#5741) 2023-12-08 18:30:56 +01:00
Oliver Stöneberg
3fc62ce10b
fixed #12227 - properly load addons from cppcheck.cfg in GUI (#5716)
The GUI was asserting when addons were specified in the `cppcheck.cfg`
since we did not generate the info for them.
2023-12-06 19:45:30 +01:00
Oliver Stöneberg
3272a2bbe7
greatly improved Settings::loadCppcheckCfg() error handling (#5712)
This also fixes the issue that `cppcheck.cfg` is no longer being loaded
from executable path. That was introduced by #5704.
2023-12-01 16:34:14 +01:00
Oliver Stöneberg
2a15428096
fixed #12059 - added --fsigned-char and --funsigned-char command-line options (#5580) 2023-11-08 09:28:33 +01:00
chrchr-github
13e74507dd
Update releasenotes.txt [skip ci] (#5636) 2023-11-07 15:11:41 +01:00
Oliver Stöneberg
fdb3de708e
fixed #12042 - deprecated building with Qt5 / build with Qt6 in CI / updated latest Qt in CI to 6.5.3 (#4957)
Qt 5.15 will be EOL on May 26 so we should start switching away from it.
We already have issues with many of the previous versions and qmake on
legacy distros so we should cut that off.

I will add a Qt6 release build for Windows in another PR so it can be
tested. We should switch to it as the delivered build after the next
release and stop using Qt5 altogether in the CI in the release
afterwards (that would get rid of several build steps). We could leave
it so you could still try to build it but no longer support it so it is
up to the user to get it to work before removing it completely later on.
2023-10-26 14:55:59 +02:00
Oliver Stöneberg
122e142726
fixed #12113 - made CMake build work with UBSAN and GCC (#5590)
GCC does not support `-fsanitize=nullability`
2023-10-24 21:53:58 +02:00
Oliver Stöneberg
85fe627c68
fixed some typos (#5562) 2023-10-17 18:32:07 +02:00
Daniel Marjamäki
dd76504f82
Fixed #3537 (Allow inline suppression comments for macros) (#5559) 2023-10-16 19:43:15 +02:00
Oliver Stöneberg
84f2485a26
fixed #7099 - added optional man target to CMake / build manpage in CI (#5536) 2023-10-09 22:20:36 +02:00
Oliver Stöneberg
0f28f3e493
generate AddonInfo only once (#4958)
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.
2023-10-08 21:28:57 +02:00
Oliver Stöneberg
3ba53c6b6a
fixed #12022 - disallow using --project with source files (#5515) 2023-10-08 09:07:15 +02:00
Oliver Stöneberg
5a52fa80fb
refs #12022 - disallow multiple --project options (#5499) 2023-10-05 21:36:44 +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
98ce46a3e5
fixed #11919 - Removed deprecated command-line options --template <template> and --template-format=<template> (#5439) 2023-09-12 22:46:40 +02:00
Oliver Stöneberg
64cd09ab62
fixed #11917 (Default to native platform in Windows builds) (#5428) 2023-09-11 11:08:23 +02:00
Daniel Marjamäki
c816aecae4 releasenotes.txt: start new notes for 2.13 2023-09-10 17:08:14 +02:00
Oliver Stöneberg
3cbbb77335
fixed #11926 (Treat MacOS filesystem as case insensitive) / TestPath: added more tests (#5412) 2023-09-08 17:33:37 +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
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
Oliver Stöneberg
ad1caa8100
report internalError when command execution returns errorcode / also some related cleanups and tests (#5037)
Encountered while investigating https://trac.cppcheck.net/ticket/11708.

This has been like this since the introduction of `internalError` in
b6bcdf29363a25112b8884fc9944237f1461402d (almost ten years ago to the
day). Logging internal errors which bail out(!) of the analysis simply
to `std::cout` for them possibly never to be seen (and also not affected
the exitcode) is pretty bad IMO. They should always be visible.

I also removed the filename from the message as it is already available
(and thus redundant) and its existence should be defined by the
template.
2023-08-31 13:33:29 +02:00
Paul Fultz II
03b952d5eb
Fix 11579: false negative: knownConditionTrueFalse with non-bool as bool parameter (#5349)
This adds a new checker to check for pointer to bool conversions that
are always known. I removed the previous knownConditionTrueFalse checks
since this was too noisy.
2023-08-20 22:32:41 +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
17842394c00fd0288abfed509baad76aa3a5f2e9 back in 2011(!). And
`--template-location` has never been documented since its induction in
f058d9ad083a6111e9339b4b3506c5da7db579e0. That's also why we can have a
short deprecation period.
2023-08-18 11:59:14 +02:00
chrchr-github
76ffd21ecf
Update releasenotes.txt [skip ci] (#5313) 2023-08-11 16:49:49 +02:00
Oliver Stöneberg
de9795b07b
deprecated qmake build system / removed Qt5 fallback when using USE_QT6=On (#5271)
QT 5 is now completely EOL and since we never supported Qt6 in qmake
which also has various shortcomings, it is time to at least deprecate it
and direct users to CMake instead.
2023-08-09 22:40:15 +02:00
Daniel Marjamäki
353f54089c releasenotes.txt: bumped version to 2.12 2023-06-22 13:53:40 +02:00
Paul Fultz II
1ad51ed01a
Update releasenotes.txt (#5180) 2023-06-22 10:40:36 +02:00
Oliver Stöneberg
b5ce2c708b
SingleExecutor: process markup files after code when scanning projects (#4972)
* 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
12118d8d67 Document --check-level better 2023-04-11 15:30:07 +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
Daniel Marjamäki
89a95ddc8f --performance-valueflow-max-if-count: review comments 2023-04-08 13:07:28 +02:00
Paul Fultz II
93b4de36cd
Update constVariable IDs for references and pointers (#4904) 2023-04-07 20:14:53 +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
7fd4118d60
Fix #10039 (integrate --check-config include findings with normal analysis) / also fixes #11283 (#3229) 2023-03-04 09:02:35 +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
Oliver Stöneberg
1a460d7bc0
bumped version to 2.11 (#4751) 2023-01-29 15:18:22 +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
a0b1285f4a
added CMake option BUILD_CORE_DLL to build lib as cppcheck-core.dll with Visual Studio (#4733) 2023-01-26 22:13:07 +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