Commit Graph

1776 Commits

Author SHA1 Message Date
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 b70e1d5461
avoid some unchecked pointer dereferences (#4811) 2023-03-02 22:05:41 +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 fd98e006a7
fixed #10961 (Qt 6 lupdate reports "ko" (Korean) "language is not recognized") (#4830) 2023-03-02 21:21:23 +01:00
Oliver Stöneberg 75619db1d5
symboldatabase.cpp: use `Keywords` / added TODOs (#4828) 2023-03-02 21:20:56 +01:00
Oliver Stöneberg 8583fcf96e
avoid more cases of returning non-const pointers from `const` objects (#4821) 2023-02-24 21:22:08 +01:00
Paul Fultz II 346ecdb53a
Improve valueflow after pushing to container (#4803) 2023-02-23 18:05:31 +01:00
Oliver Stöneberg 8ef14dad98
fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +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 66758d65f9
updated precompiled headers based on `ClangBuildAnalyzer` (#4775) 2023-02-08 08:19:21 +01:00
Daniel Marjamäki d3e7566470 GUI: Set proper title for compliance report dialog 2023-01-30 20:39:30 +01:00
Daniel Marjamäki e1b313ba76 GUI: Generate compliance report 2023-01-30 14:59:45 +01:00
Daniel Marjamäki 464fbe8d53 Update copyright year 2023-01-28 10:16:34 +01:00
Daniel Marjamäki 1f9eb757a5 GUI: Update translations 2023-01-28 10:15:00 +01:00
Oliver Stöneberg b097eca2ec
added handling of library element `entrypoint` to GUI / added GUI tests to CTest (#4744) 2023-01-27 19:43:08 +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
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 a09667a6d9
removed unused error messages (#4689) 2023-01-07 10:35:39 +01:00
Daniel Marjamäki e70afda95a GUI: Re-enable misra interface in open source GUI 2022-12-31 16:08:23 +01:00
Oliver Stöneberg 0c95971c54
added .gitattributes and normalized files (#4668) 2022-12-30 21:33:45 +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
Oliver Stöneberg 6fedbb4f77
add/preserve `const` in `dynamic_cast` (#4655) 2022-12-19 20:01:12 +01:00
Oliver Stöneberg 0ed98c8f29
removed unused test files (#4648) 2022-12-18 19:36:37 +01:00
Daniel Marjamäki 50241224d0 GUI: better exclude of files. the canonical Qt method might return absolute paths from relative input paths. 2022-11-19 14:11:40 +01:00
Daniel Marjamäki 0d2993408a GUI: Install link when new version is available 2022-11-08 13:33:57 +01:00
Daniel Marjamäki 2c53b73e1b GUI: only run misra addon in premium version. remove misra rule texts configuration that is not needed in premium. 2022-11-03 18:20:13 +01:00
Daniel Marjamäki e8606a5e5a let --premium=misra-c-2012 also set --addon=misra. changed addons container to a set 2022-10-31 15:04:16 +01:00
Daniel Marjamäki 5c10cfd59e GUI: fix path issue with backslashes. hide non-premium setting in premium settings dialog. 2022-10-30 10:59:43 +01:00
Daniel Marjamäki 4634a72fe0 GUI: some more tweaks for 'check for updates' 2022-10-24 15:17:36 +02:00
Daniel Marjamäki fba70683bc GUI: Add setting 'Check for updates' 2022-10-22 20:27:24 +02:00
Daniel Marjamäki 60d9a8fb54 GUI: Write better text for label, the original text might be seen a short moment. Require c++17 for building the GUI with the gui.pro. 2022-10-17 21:40:35 +02:00
chrchr-github 3273e51fd5
Fix #10412 FN useStlAlgorithm with iterators (#4157) 2022-10-16 13:46:26 +02:00
Daniel Marjamäki 94c3108494 GUI: Detect when version is old 2022-10-09 18:51:01 +02:00
Tomo Dote c5a226470a
Add few Japanese translations only (#4539) 2022-10-09 07:40:10 +02:00
Daniel Marjamäki e35187cf9b GUI: proper loading of cppcheck.cfg 2022-10-08 17:05:18 +02:00
Oliver Stöneberg cff1cd9cda
applied clang-tidy `misc-const-correctness` fixes for POD types, iterators and references (#4529)
* applied `misc-const-correctness` fixes for POD types and iterators

* applied `misc-const-correctness` fixes for references
2022-10-02 07:12:40 +02:00
Oliver Stöneberg 858585ceb1
disabled all clang-tidy checks for Qt generated files (#4525)
* disabled cll clang-tidy checks for Qt generated files

* enabled `bugprone-suspicious-include` clang-tidy warning
2022-09-30 07:27:03 +02:00
Oliver Stöneberg b9e07e918e
enabled and fixed `readability-named-parameter` clang-tidy warnings (#4487) 2022-09-27 20:03:25 +02:00
Oliver Stöneberg 897826006e
mitigated some clang-tidy warnings in headers (#4472)
* erroritem.h: avoid `performance-no-int-to-ptr` clang-tidy warning

* suppress `readability-inconsistent-declaration-parameter-name` clang-tidy warnings for Qt signals

* tokenlist.h: mitigated `readability-make-member-function-const` clang-tidy warnings

* fixed `modernize-use-override` clang-tidy warnings in headers

* fixed `modernize-pass-by-value` clang-tidy warnings in headers

* tokenize.cpp: avoid unnecessary copy
2022-09-16 18:59:15 +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 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 dbc05da356
fixed some clang-tidy warnings (#4435) 2022-09-08 20:01:41 +02:00
Oliver Stöneberg b3762cd76a
actually perform system tinyxml2 build on macos / fixed system tinyxml2 include (#4445)
* lib/CMakeLists.txt: removed unnecessary external include

* look up tinyxml2 include dir when using system one and specify it

* lib/CMakeLists.txt: do not treat bundled headers as system ones

* CI-unixish.yml: actually perform system tinyxml2 build on macos
2022-09-06 18:30:59 +02:00
Oliver Stöneberg 4d767d821e
use same output folder for GUI tests qmake builds to leverage existing output files from regular build (#4433) 2022-09-04 10:25:16 +02:00
Daniel Marjamäki a400c94230 Update Copyrights 2022-08-28 14:22:12 +02:00
Daniel Marjamäki 4b98fd00e8 gui: run lupdate 2022-08-28 13:28:24 +02:00
Daniel Marjamäki a2454ecbca cli import cppcheck project with premium options 2022-08-23 20:13:03 +02:00
Daniel Marjamäki 5d267000e2 GUI: configuration of premium features 2022-08-22 21:11:28 +02:00
Oliver Stöneberg 5f171b9673
fixed some `modernize-use-emplace` false negatives with `std::stack` / removed `internalStlUsage` check (#4346) 2022-08-17 09:50:14 +02:00
Oliver Stöneberg c54b3f4de0
removed leftover bughunting GUI related fields from `ErrorMessage` (#4351) 2022-08-13 08:27:52 +02:00
Oliver Stöneberg 156323c95e
avoid unnecessary copies with `insert()` (#4323) 2022-08-07 19:31:16 +02:00
Rikard Falkeborn cfa5cd4849
CERT addon removal cleanup (#4322)
* cmdlineparser: Update addon example to misra

* gui/help: Remove reference to CERT

* manual: Remove reference to CERT
2022-07-29 16:46:36 +02:00
Oliver Stöneberg b65b47d3a8
enabled and fixed `modernize-pass-by-value` clang-tidy warnings (#4169) 2022-07-28 22:51:45 +02:00
Oliver Stöneberg 887463855b
mitigated most clang-tidy warnings in headers (#4175) 2022-07-26 11:10:03 +02:00
Daniel Marjamäki db155a59c1 Tokenizer: remove simplifyTokenList2 2022-07-18 16:20:36 +02:00
chrchr-github 2c7d98626a
Fix FP leakNoVarFunctionCall with Qt object (#4272)
* Add missing <leak-ignore/>, test

* Fix qt.cfg, format

* Fix FP leakNoVarFunctionCall

* Format

* Delete memory, rule of five

* Missing include

* Avoid dependency

* explicit

* Fix Qt test case

* Fix typo

* Fix

* Add Q_OBJECT
2022-07-13 21:09:53 +02:00
Oliver Stöneberg e8b0f12367
replaced `if(MATCHES)` with `if(STREQUAL)` (#4263)
`MATCHES` does regular expression matching which is not the intended behavior here. `Clang` still requires it since it also needs to match `AppleClang.
2022-07-11 10:46:18 +02:00
Oliver Stöneberg c4fc1bf1c9
fixed memory leak in `cppcheck-gui` (#4248)
* settingsdialog.cpp: fixed memory leak

Direct leak of 200 byte(s) in 1 object(s) allocated from:
    #0 0xa15a2d in operator new(unsigned long) (/mnt/s/GitHub/cppcheck-fw/cmake-build-debug-wsl-kali-clang-asan-ubsan/bin/cppcheck-gui+0xa15a2d)
    #1 0xe639af in SettingsDialog::SettingsDialog(ApplicationList*, TranslationHandler*, QWidget*) /mnt/s/GitHub/cppcheck-fw/gui/settingsdialog.cpp:75:21
    #2 0xc67807 in MainWindow::programSettings() /mnt/s/GitHub/cppcheck-fw/gui/mainwindow.cpp:1064:20
    #3 0xd1deb8 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::*)()>::call(void (MainWindow::*)(), MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152:13
    #4 0xd1db5c in void QtPrivate::FunctionPointer<void (MainWindow::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::*)(), MainWindow*, void**) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185:13
    #5 0xd1d675 in QtPrivate::QSlotObject<void (MainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:418:17
    #6 0x7f9687f26132  (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x2e6132)
    #7 0x7f96889ccdc1 in QAction::triggered(bool) (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x15cdc1)

* resultstree.cpp: adjusted TODO about memory leaks
2022-07-09 22:32:48 +02:00
Maksim Derbasov a65f6952dc
Codeeditor: multiline comment fix (#4253) 2022-07-08 12:37:05 +02:00
Mathias Schmid c897c0474b
Library Data: Add support for optional smart pointer element 'unique' (#4132) 2022-07-04 22:23:20 +02:00
chrchr-github 1d677c57a8
Fix #11126 FN: noExplicitConstructor with single default parameter (#4174) 2022-06-07 21:15:13 +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
Daniel Marjamäki 1f6554e2e8 Update copyright year 2022-05-21 12:18:27 +02:00
Daniel Marjamäki c91dc87577 GUI: lupdate gui.pro 2022-05-21 12:17:16 +02:00
Oliver Stöneberg 14421ae627
fail `run-clang-tidy` in case of compiler warnings / fixed Clang warnings / cleanups (#4036) 2022-05-15 12:42:29 +02:00
Oliver Stöneberg c71033548f
fixed some clang-tidy warnings (#3080) 2022-05-08 20:42:06 +02:00
Maksim Derbasov 3ca2eb984e
Codeeditor class improvements (#4057) 2022-04-29 18:10:37 +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
Daniel Marjamäki 5825ab75db GUI: allow that misra addon is executed without rule texts file 2022-04-14 09:09:58 +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
fu7mu4 375df3a6af
Add Japanese Translation for v2.7 (#4000) 2022-04-11 16:01:01 +02:00
Oliver Stöneberg 2d9ec39a2d
make sure we remove obsolete entries from translations (#3995) 2022-04-11 11:25:08 +02:00
Daniel Marjamäki 8f386e15fd Remove bug hunting. This feature will be provided in Cppcheck premium. 2022-04-11 07:31:33 +02:00
Daniel Marjamäki 4365704f14 cppcheck.cfg: support custom productname and about message 2022-03-24 22:44:47 +01: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
Daniel Marjamäki 1fe7cd348a exename: Set proper exename when cppcheck is executed from PATH and argv[0] does not contain path information 2022-03-21 18:35:53 +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 9d524616b3
use forward declarations for Ui:: objects / renamed *.ui files to mat… (#3796) 2022-03-19 19:54:20 +01:00
Georgi D. Sotirov 33315b0ae5
Replace tinyxml2_LIBRARY with tinyxml2_LIBRARIES (#3897) 2022-03-15 21:17:03 +01:00
Oliver Stöneberg 0d336b868c
avoid some Clang compiler warnings (#3896) 2022-03-13 20:07:58 +01:00
Oliver Stöneberg 12c1c081dc
run dmake and update Qt translation files on CMake build (#3820) 2022-02-16 07:06:59 +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
Oliver Stöneberg d528555002
some preparations for Qt6 support (#3777)
* findDependencies.cmake: cleaned up find_package() call for Qt

* some CMake preparations for Qt6 support

* some Qt6 compilation fixes
2022-02-07 17:35:25 +01:00
Oliver Stöneberg 047930fd17
removed some unused/unread member variables (and related code) found by CLion "Unused global declaration" inspection (#3808) 2022-02-07 15:34:34 +01:00
Oliver Stöneberg 974dd5d49f
only use bundled tinyxml2 in CMake when configured to do so (#3806) 2022-02-06 13:02:52 +01:00
Daniel Marjamäki 3989408738 Update copyright year 2022-02-05 11:45:17 +01:00
Daniel Marjamäki e9be84d81a GUI: lupdate gui.pro 2022-02-05 11:43:36 +01:00
Daniel Marjamäki 0c66453c21 GUI: use range for instead of foreach 2022-02-05 11:33:28 +01:00
Oliver Stöneberg 58f9672ff4
cleaned up GUI includes based on include-what-you-use (#3792) 2022-02-02 22:31:51 +01:00
Oliver Stöneberg 9d36dd56a8
reordered includes in GUI code (#3790) 2022-02-02 16:17:28 +01:00
Oliver Stöneberg d6ae089ca5
fixed most of the Qt deprecation warnings (#3779) 2022-02-01 17:26:16 +01:00
Oliver Stöneberg a03d754d19
more copyright fixes (#3771) 2022-01-28 18:30:12 +01:00
Oliver Stöneberg 38420c8ecf
added some more missing copyright headers (#3766) 2022-01-28 15:56:11 +01:00
Oliver Stöneberg a2a9c90142
added some missing copyright headers (#3758) 2022-01-26 19:02:20 +01:00
Oliver Stöneberg 7d26cb68d9
CI-unixish.yml: Use Qt version provided by the distro (#3729) 2022-01-24 21:55:48 +01:00