Commit Graph

1000 Commits

Author SHA1 Message Date
Paul Fultz II 2a3657154b
Dont require __main__ for an addon (#3363) 2021-08-12 20:17:51 +02:00
Alfi Maulana aab5b39e2d
feat: add support for .ipp and .ixx extensions (#3383) 2021-08-09 10:46:56 +02:00
Paul Fultz II 7f358b2bed
Format with uncrustify (#3388) 2021-08-07 20:51:18 +02:00
Lauri Nurmi 8869ee3554
Fix compilation with recent glibc where SIGSTKSZ is not constant. (#3378) 2021-08-04 07:45:50 +02:00
Coldfirex 3312a9f934
Add support for Haiku (#3342)
* Update cppcheckexecutor.cpp

* Update threadexecutor.cpp
2021-07-20 11:04:20 +02:00
chrchr-github 8cd8b9c64e
Fix MSVC build and some warnings (#3334) 2021-07-16 21:55:12 +02:00
vahtis 2abe07f279
Alternative macro for NAME_MAX on SunOs 11 (#3336)
Co-authored-by: vahtis <vahtis@iki.fi>
2021-07-14 20:50:14 +02:00
Paul Fultz II 8dc1fa7a59
Add colors to CLI reporting (#3304) 2021-07-08 21:21:35 +02:00
Daniel Marjamäki 3e3e9d8c50 2.5; Update versions 2021-07-04 08:40:41 +02:00
Daniel Marjamäki c489626167 updated copyright year 2021-07-04 08:09:11 +02:00
keinflue 6b8029633f
Fix build warnings and checkcfg errors with musl and libc++. (#3244)
* Fix musl include warning.

* Fix test/cfg errors with musl/libc++.

* Use correct C++ include for PR #3244

Co-authored-by: keinflue <>
2021-05-03 09:39:33 +02:00
Daniel Marjamäki d2d2124238 Revert "Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again."
This reverts commit 207361b174.
2021-04-30 16:47:02 +02:00
Daniel Marjamäki 207361b174 Clang import; This experimental feature didn't "take off" much. After a lot of work we are still far fram the goal. I remove it now but don't rule out completely that it could ever be added again. 2021-04-21 18:59:48 +02:00
Ken-Patrick Lehrmann 5768c3a726
Check stat return value in addFiles2 (#3214) 2021-04-18 21:52:14 +02:00
Daniel Marjamäki 93873be81a Cppcheck CLI; Better filtering of duplicate XML results when no -j is used 2021-04-05 20:09:45 +02:00
DGarry82 77716ee398
fix w64-mingw32-ld linking error (#3184)
* fix w64-mingw32-ld linking error

use shlwapi instead of Shlwapi.lib in mingw-w64 build environment
(prevents "/usr/bin/x86_64-w64-mingw32-ld: cannot find -lShlwapi" error)

* same MinGW shlwapi fix for {tests,tools}/CMakeLists.txt

Co-authored-by: Igor Rondarev <igor.rondarev@gmail.com>
2021-03-29 17:04:42 +02:00
Daniel Marjamäki cba0101df5 2.4: Set version 2021-03-21 21:25:54 +01:00
Daniel Marjamäki 42437277dc Update Copyright year 2021-03-21 20:58:32 +01:00
Daniel Marjamäki 3502036b14 Usability: Fixed loading of platform file placed in same path as project file 2021-03-05 08:39:09 +01:00
Daniel Marjamäki 849ea6b3c8 Fix compilation errors 2021-02-24 22:12:48 +01:00
PKEuS 141d2ac215 Refactorization: Improved internal implementation of severity and certainty levels
Backported from LCppC.
2021-02-24 22:00:06 +01:00
PKEuS cf1937294a Refactorization: Removed unnecessary \n and spaces in strings
Merged from LCppC.
2021-02-20 12:58:42 +01:00
Philipp Kloke ef82897af5 Refactorization: Use std::string::pop_back
Merged from LCppC.
2021-02-17 22:39:29 +01:00
YQGong b7ce2a5a99
fix NAME_MAX not found on macOS GCC8.1 (#3098) 2021-01-30 14:45:03 +01:00
Oliver Stöneberg 0df10c3cb5
enabled daca warnings in self-check (#3075) 2021-01-28 22:16:51 +01:00
Oliver Stöneberg c94713c607
improved error handling in ThreadExecutor (#3023) 2021-01-13 12:41:59 +01:00
Oliver Stöneberg 7c5015d54e
fixed --check-library not showing anything on its own (#3035) 2021-01-12 20:53:05 +01:00
Oliver Stöneberg ac7647fcd8
some self-check suppression cleanups (#3032) 2021-01-09 20:32:38 +01:00
Rikard Falkeborn bedf3118ef
library: Refactor to use enum class (#3026) 2021-01-08 10:29:01 +01:00
Oliver Stöneberg a7f0e91539
cppcheckexecutor.cpp: fixed stack-use-after-scope reported by ASAN (#3018) 2021-01-06 11:39:24 +01:00
Oliver Stöneberg 96704c9971
fixed and enabled some more clang-tidy warnings (#3007) 2021-01-05 17:51:32 +01:00
Oliver Stöneberg fbf5858f76
fixed and enabled several clang-tidy warnings (#2816) 2021-01-02 19:10:25 +01:00
Daniel Marjamäki e7c462b827 Refactoring; Avoid 'unsigned' 2020-12-27 21:05:31 +01:00
Oliver Stöneberg 0a1012a273
fixed and enabled -Wdocumentation and -Wdocumentation-pedantic clang warnings (#2819) 2020-12-27 09:15:59 +01:00
Oliver Stöneberg 9d57b832b8
fixed passedByValue warning hidden by suppression for false positive (#2974) 2020-12-24 20:09:11 +01:00
amai2012 f0da9098b9
Set language compatibility to C++14 in Visual Studio (#2967)
There is no C++11 flag
2020-12-22 10:24:25 +01:00
Daniel Marjamäki a493e17a6a Tweaks to use summaries in GUI 2020-12-19 20:46:00 +01:00
Daniel Marjamäki 96caaedbd5 Generate basic function summaries 2020-12-19 19:02:42 +01:00
Daniel Marjamäki 1b0ca0811f Bug hunting; option to set function analysis max time 2020-12-18 19:59:10 +01:00
niooss-ledger 0dbff657ab
Add missing \n in help (#2941)
cppcheck --help printed:

    --project-configuration=<config>
                         If used together with a Visual Studio Solution (*.sln)
                         or Visual Studio Project (*.vcxproj) you can limit
                         the configuration cppcheck should check.
                         For example: --project-configuration=Release|Win32    --max-configs=<limit>
                         Maximum number of configurations to check in a file
                         before skipping it. Default is '12'. If used together
                         with '--force', the last option is the one that is
                         effective.

A "\n" was missing before option --max-configs, and the doublequotes did
nothing.
2020-12-12 08:30:10 +01:00
Daniel Marjamäki 2a1e230d2e 2.3: Update version 2020-12-05 10:00:02 +01:00
Daniel Marjamäki c89512d8d6 Update copyright year 2020-12-05 09:28:33 +01:00
Oliver Stöneberg 097abe013d
perform all tasks in each loop execution in ThreadExecutor::check() (#2932) 2020-12-04 08:07:14 +01:00
Daniel Marjamäki 894b79227d Revert "Revert "fixed excessive spawning of child processes / fixed potential zombie processes (#2924)""
This reverts commit 5650897a4b.
2020-12-03 18:06:18 +01:00
Daniel Marjamäki 5650897a4b Revert "fixed excessive spawning of child processes / fixed potential zombie processes (#2924)"
This reverts commit 873aa075b4.

There was performance issues.
2020-12-03 12:25:59 +01:00
Oliver Stöneberg 873aa075b4
fixed excessive spawning of child processes / fixed potential zombie processes (#2924) 2020-11-29 14:59:09 +01:00
Wolfgang Stöggl 8ac55a8534
Add find_package(tinyxml2) to CMake builds (#2691)
So far, the cmake files of Cppcheck needed to be patched in order to
use installed tinyxml2 instead of the bundled version of tinyxml2.
- Introduce the CMake option USE_BUNDLED_TINYXML2 with a default value
  of ON. This preserves the behavior as in the past and uses the
  bundled version under externals/tinyxml2 by default.
- Usage of the installed tinyxml2 version of a system can be enabled
  now using -DUSE_BUNDLED_TINYXML2=OFF as a cmake parameter.
- Some Linux distros do not install tinyxml2*.cmake files, which are
  required to find tinyxml2 using find_package().
  Try first using find_package(tinyxml2 QUIET) and if this fails, try
  again using find_library(tinyxml2_LIBRARY tinyxml2)
2020-11-22 08:57:07 +01:00
Georgy Komarov 4517c9aae6
Add Elbrus E1C+ platform (#2913) 2020-11-20 10:36:13 +01:00
Daniel Marjamäki 9c27ba835d astyle formatting 2020-11-19 21:25:49 +01:00
Lars Even Almaas 5d9b22635a
Added enhanced pic8 platform (#2910) 2020-11-19 12:13:19 +01:00
Lars Even Almaas 09140f4655
Added PIC and MIPS platforms. (#2909) 2020-11-19 08:11:59 +01:00
Daniel Marjamäki c7cbe7f2d3 rename externals/tinyxml to externals/tinyxml2 2020-11-16 09:11:53 +01:00
Daniel Marjamäki b7f812739c astyle formatting 2020-11-13 15:52:57 +01:00
Falital 2e2d4a0055
Added Hash to plist file names (#2898) 2020-11-13 15:52:24 +01:00
Pino Toscano 0a50d8e8f4
FileLister: ensure enough space for resulting dirent (#2850)
On some platforms, the 'd_name' field of struct dirent is not a static
fixed-sized array but a "flexarray" (i.e. a single character); in this
situation, 'd_name' points to a buffer allocated somewhere, usually
at the end of the buffer used for dirent (which is then allocated in a
bigger memory). Because of this, creating a struct dirent on stack as
buffer for readdir_r is not enough to store all the memory needed for
a dirent on those platforms.

As result, create an helper union with all the needed space, calculated
statically at build time. NAME_MAX+1 is still not a perfect option, but
it will do the job in the vast majority of cases.
2020-10-18 20:43:33 +02:00
Daniel Marjamäki 2e20ee9e39 set version 2.2.99 2020-10-03 13:54:17 +02:00
Daniel Marjamäki c373be0b16 2.2: Update versions 2020-10-03 10:47:35 +02:00
Daniel Marjamäki d615dba638 Write 'inconclusive:' in daca2 warnings 2020-09-26 11:02:10 +02:00
Oliver Stöneberg fb37137216
extended the --clang command-line option so you can specify a custom … (#2734) 2020-09-06 07:46:51 +02:00
Daniel Marjamäki da1de50deb Clang: The clang parser import should be considered to be an experimental feature for now. There are many problems to solve. 2020-09-04 18:30:29 +02:00
Daniel Marjamäki dc6f0740c1 CLI: fix execute command, quote argument that contains spaces 2020-08-30 20:02:18 +02:00
Georgy Komarov c5369b84e1
Prevent copying in range-based for loops (#2751)
Use reference types in range for loops to prevent copying.
2020-08-23 20:53:44 +02:00
Daniel Marjamäki fac8e52379 Tweked --help output 2020-06-14 17:23:29 +02:00
Daniel Marjamäki 97fd51edd1 Set version to 2.1.99 / 2.2 dev 2020-06-14 07:16:14 +02:00
Daniel Marjamäki 026bbac975 2.1: Set version 2020-06-13 17:04:26 +02:00
Daniel Marjamäki 37245a8179 Update copyright year 2020-06-13 16:37:12 +02: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 6b7b3eda2f Tweaked --help; added --bug-hunting 2020-05-28 08:38:53 +02:00
Daniel Marjamäki 47ee126aa9 Tweaked --help output 2020-05-28 08:33:50 +02:00
Oliver Stöneberg 3a90341961
some CMake cleanups and additions (#2639) 2020-05-27 05:15:46 +02:00
Oliver Stöneberg c1f762b861
disabled some Visual Studio warnings (#2635) 2020-05-23 17:42:56 +02:00
Oliver Stöneberg 37bc0483a4
made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
Daniel Marjamäki 5a0b5139a0 Fix compile error in windows 2020-05-19 22:13:46 +02:00
Daniel Marjamäki 299e11c991 Fixed Cppcheck warnings 2020-05-19 21:55:28 +02:00
Daniel Marjamäki 32e569704b executeCommand in CppCheckExecutor or QCheckThread 2020-05-19 16:04:40 +02:00
PKEuS 4948f85460 Visual Studio: Updated solution
- Enable several compiler warnings again
- Let __cplusplus have a reasonable value
2020-05-19 08:35:13 +02:00
PKEuS e9318d7bfc Refactorization: Avoid creating a temporary string 2020-05-19 08:35:12 +02:00
PKEuS e92a95150a Refactorization: Use emplace methods in CLI 2020-05-19 08:35:12 +02:00
Daniel Marjamäki dc32f428ff Set Cppcheck version 2020-05-10 11:28:31 +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
Daniel Marjamäki 9f76fcf5f1 Fixed Cppcheck warning 2020-05-09 14:45:47 +02:00
Daniel Marjamäki 32cbbb09ed cli: publish the --clang option 2020-05-08 20:52:42 +02:00
Daniel Marjamäki 5a9e81897a ExprEngine: Document how it works 2020-04-30 12:18:49 +02:00
Daniel Marjamäki 6d7dd7400d Refactoring; Sort options alphabetically. Removed unused --check-diff functionality. 2020-04-26 10:22:12 +02:00
Daniel Marjamäki 05dcb9a435 Clang import; Allow Clang import without a Cppcheck build dir 2020-04-21 22:26:34 +02:00
Daniel Marjamäki 7921aa891a Thank you Z3 2020-04-20 20:34:47 +02:00
Daniel Marjamäki 5626d22835 Tweak message. --std=posix will be deprecated in 2.05 2020-04-19 21:25:20 +02:00
Lukas Grützmacher 095fd2bc62
add command line option to select single project configuration of loaded solution (#2523)
* add command line option to select single project configuration of loaded solution

* Update cmdlineparser.cpp

* Update manual.md

* fix initialization
2020-04-19 18:19:28 +02:00
amai2012 13d88d7132 Add ..\externals to include path 2020-04-18 11:03:26 +02:00
Oliver Stöneberg 2c1e36e63e
cleaned up includes based on include-what-you-use (#2600)
* cleaned up includes based on include-what-you-use

* check.h: trying to work around Visual Studio 2012 bug

* fixed Visual Studio compilation
2020-04-13 13:44:48 +02:00
Sam Lane 60f9fefcd4
Add Support For Configuring Addon Python Interpreter Version (#2591) 2020-04-05 10:57:28 +02:00
Daniel Marjamäki 7577bdb1df DACA: Try to avoid some crashes/hangs for the most crazy code so we can focus on most serious bugs first 2020-03-31 11:33:38 +02:00
fuzzelhjb 9f3deb30b1
Support clang tidy (#2564)
* add basic clang-tidy support in the same way as in the GUI

* fix native path

* fix some code styles

* fix cppcheck findings

* update again

* only do clang-tidy if set in the project file

* fix handling if folders have spaces

* tiny fixes

* some tiny updates

* make clang-tidy error message parser more robust

Co-authored-by: fuzzelhjb <FaniXagy8-Hopk>
2020-03-15 11:09:35 +01:00
Rikard Falkeborn 2a16e8d4c1
Kill child if parent dies (#2544) 2020-02-18 10:09:29 +01:00
Daniel Marjamäki cea17acd92 CLI: A --bug-hunting flag is needed for the tests 2020-02-12 16:30:18 +01:00
Daniel Marjamäki f31447943c CLI: Remove experimental --safe-classes, --safe-functions, --bug-hunting, --debug-bug-hunting 2020-02-10 20:27:25 +01:00
Mathias Buhr 60ada656a0
Allow filtering when using --project (#2522) 2020-02-09 10:51:29 +01:00