Commit Graph

134 Commits

Author SHA1 Message Date
Oliver Stöneberg 8c0d43d928
removed unnecessary encapsulation of severity enum and made it an `enum class` (#5541) 2023-10-12 11:58:39 +02: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 a43b55a0ca
Improved addon execution errorhandling (#5451) 2023-09-20 10:40:57 +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 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 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
chrchr-github 3836367d95
Fix FN passedByValue with array access, range-based for (#4922)
* Fix FN passedByValue with array access, range-based for

* Format

* Fix/suppress new warnings
2023-03-30 07:24:23 +02:00
Oliver Stöneberg b70e1d5461
avoid some unchecked pointer dereferences (#4811) 2023-03-02 22:05:41 +01:00
Daniel Marjamäki 464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Daniel Marjamäki f8c4354d2e Cleanup *.ctu-info files that are not needed anymore after analysis 2023-01-18 17:32:14 +01:00
Oliver Stöneberg 1cfe49e340
use `const_iterator` where possible (#4662) 2022-12-30 15:13:47 +01:00
Oliver Stöneberg 3c68b9b29f
use `cbegin()` and `cend()` with `const_ierator` loops (#4658) 2022-12-20 20:32:16 +01:00
chrchr-github 3273e51fd5
Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
Oliver Stöneberg 339484d2a1
mitigated and enabled more clang-tidy warnings (#4470)
* fixed some `performance-inefficient-string-concatenation` clang-tidy warnings

* fixed and enabled `modernize-replace-random-shuffle` clang-tidy warning

* fixed and enabled `bugprone-suspicious-string-compare` clang-tidy warning

* mitigated and enabled `readability-non-const-parameter` clang-tidy warnings

* clang-tidy.md: documented some disabled checks

* mitigated and enabled `performance-unnecessary-value-param` clang-tidy warnings
2022-09-16 18:58:59 +02:00
Oliver Stöneberg d36e05af28
enabled and fixed `modernize-use-emplace` clang-tidy warnings (#4165)
* enabled and fixed `modernize-use-emplace` clang-tidy warnings

* avoid unnecessary creation of temporaries in `emplace_back()` calls
2022-06-03 15:09:29 +02:00
Oliver Stöneberg 36ef4dc5b8
added support for Qt6 (#3930) 2022-04-15 18:49:24 +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 45158ec064
cleaned up includes based on include-what-you-use (#4007)
* cleaned up includes based on include-what-you-use

* updated translations
2022-04-13 12:24:00 +02:00
Oliver Stöneberg 902f46bae5
some minor QRegularExpression usage optimizations and cleanups (#3999) 2022-04-11 19:15:42 +02:00
Daniel Marjamäki 92316b07c8 Remove CERT addon from open source Cppcheck. The plan is to provide complete CERT C checking in Cppcheck Premium during this year. 2022-03-23 20:30:43 +01:00
Oliver Stöneberg a0bab85bf9
ported GUI code from QRegExp to QRegularExpression (#3785) 2022-03-23 18:16:22 +01:00
Oliver Stöneberg e48b5fc920
avoid usage of deprecated Qt APIs (#3923) 2022-03-22 21:44:41 +01:00
Oliver Stöneberg 2b3fc5ed1a
replaced Qt `foreach()` with standard `for` range loop / some related cleanups (#3915)
* replaced Qt foreach() with standard for range loop / some related cleanups

* updated translations
2022-03-21 17:14:26 +01:00
Oliver Stöneberg 06d10b7474
fixed and enabled performance-for-range-copy clang-tidy warning (#3682) 2022-02-12 08:20:45 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Oliver Stöneberg 9d36dd56a8
reordered includes in GUI code (#3790) 2022-02-02 16:17:28 +01:00
Oliver Stöneberg 55ff684f34
added unusedFunction self check to CI / cleanups (#3526) 2022-01-18 22:02:25 +01:00
Paul Fultz II 7f358b2bed
Format with uncrustify (#3388) 2021-08-07 20:51:18 +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
PKEuS 141d2ac215 Refactorization: Improved internal implementation of severity and certainty levels
Backported from LCppC.
2021-02-24 22:00:06 +01:00
Daniel Marjamäki aa28f3fe8c Removed Cppcheck::terminate() 2020-12-04 18:47:43 +01:00
Paul 3523d2b329 Remove unused variable 2020-08-11 14:05:28 -05:00
Oliver Stöneberg 37bc0483a4
made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
Daniel Marjamäki e2ead44a2d dmake updates. externals/z3_version.h should never be added as a dependency 2020-05-19 20:14:29 +02:00
Daniel Marjamäki 64291c6b61 fix Clang execution 2020-05-19 19:17:23 +02:00
Daniel Marjamäki 32e569704b executeCommand in CppCheckExecutor or QCheckThread 2020-05-19 16:04:40 +02:00
Daniel Marjamäki 547d1b158e Fixed #9723 (GUI: inline suppressions does not work for addons) 2020-05-17 16:50:13 +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 91beccb304
fixed some clang-tidy warnings in gui code (#2565) 2020-03-07 11:33:08 +01:00
Maksim Derbasov 68a67a910e Remove .dump file after plugins execution (#2451) 2019-12-17 08:40:59 +01:00
Sebastian 95bbc7a1e2
GUI: Print and log messages when addon execution fails (#2408)
This adds an entry to the "Analysis Log" and prints a message via
`qWarning()` when the execution of an addon fails because either the
process failed to finish normally (for example if python binary is not
found) or because the script has issues (for example because of an
unhandled exception).
2019-11-30 12:58:06 +01:00
Sebastian c990d10ffa
Check for JSON error when parsing addon .json files + fixes (#2374)
* cppcheck.cpp: Check for JSON error when parsing addon .json files

This fixes that errors in JSON files given via `--addon=*.json` are
silently ignored and maybe only a part of the JSON file is used.
Now the error message which picojson can return is checked and a
corresponding error message is returned again by getAddonInfo().

* naming.json: Fix missing comma

* CLI: Fix naming violations detected by addon naming.py via naming.json

* Addon naming: Add argument for validating names of constants

* LIB: Rename functions/variables so they are valid, loosen naming rules

* GUI: Fix naming violations
2019-11-20 15:37:09 +01:00
versat feeb27f3c9 gui/checkthread.cpp: Fix warning "empty expression has no effect"
The trailing semicolons are redundant. "switch(){}" does not need one
and "Q_UNUSED()" already includes one.
2019-11-20 08:37:46 +01:00
Daniel Marjamäki 2d9a131817 Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +02:00
Daniel Marjamäki 16dc8a0540 GUI: Suppressing addon warnings 2019-08-09 19:00:09 +02:00
Daniel Marjamäki 84cc09d17c Update Copyright 2019-06-29 07:49:14 +02:00