Commit Graph

888 Commits

Author SHA1 Message Date
Daniel Marjamäki 48be067dd1 Verification; Added --verify-diff option 2019-12-31 12:05:08 +01:00
Daniel Marjamäki d16ea3293e Verification; Fix testing 2019-12-28 22:09:16 +01:00
Daniel Marjamäki 49ed1a82b4 Verification; save report in custom file 2019-12-27 19:25:06 +01:00
Daniel Marjamäki 4b4f7ea60b Verification; Updated report 2019-12-27 19:05:22 +01:00
Daniel Marjamäki 7f110f3ec3 Set version 2019-12-21 11:49:01 +01:00
Dmitry-Me 4a8ced29c4 Fix typo 2019-12-16 18:10:40 +03:00
Francesc Elies cbd9713006 [cli] help misses `--suppress-xml` description (#2436) 2019-12-09 19:01:15 +01:00
Adrien Chardon 91dd8d3b6f Improve cli --help (#2387) 2019-11-29 11:29:04 +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
Armin Müller 130ebe4b85 Typos found by running "codespell" (#2380) 2019-11-19 20:02:24 +01:00
Daniel Marjamäki 81fff2edf1 Fixed #9464 (Import compile database; only check given configuration) 2019-11-09 17:51:42 +01:00
Sebastian 3e4dd9b354
cmdlineparser.cpp: printHelp(): Replace deprecated option in example (#2290)
`--std=posix` is deprecated and will be removed in the future.
See commit cb06aebdab.
2019-10-22 15:07:30 +02:00
Daniel Marjamäki 40c3e68e07 ExprEngine: Add --debug-verify, fixed handling of global arrays 2019-09-29 15:00:54 +02:00
Oliver Stöneberg b5c598cca4 added missing OVERRIDE usage and removed redundant virtual (#2190) 2019-09-20 21:57:16 +02:00
Oliver Stöneberg 9028b4a81d do not access static methods through instance (#2189) 2019-09-20 21:54:30 +02:00
Oliver Stöneberg de9f489b08 use range loops / constness (#2181)
* use range loops / constness

* platform.cpp: avoid shadowed variable
2019-09-19 20:29:33 +02:00
Daniel Marjamäki 2d651b09fc ExprEngine: Add new experimental path-sensitive data flow analysis. Initially used for 'verification' but could possibly later be used as a complement in the normal analysis. The code is work-in-progress and hacky! 2019-09-17 21:00:59 +02:00
PKEuS e9f8dddabe Set version to 1.89.99/1.90 dev 2019-09-02 15:44:40 +02:00
Daniel Marjamäki 4ede39a9b7 1.89: Set version 2019-09-01 12:16:33 +02:00
orbitcowboy 4f94e4fff8 cmdlineparser: Fixed typo inconlusive ==> inconclusive 2019-08-20 00:31:30 +02:00
Daniel Marjamäki d95f29b23a Fixed test/cli 2019-08-18 12:51:32 +02: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 6431d1c58a cli: Change default --template format, Cppcheck will now use the gcc template by default. Added --template=cppcheck1 format. 2019-08-18 07:50:50 +02:00
Daniel Marjamäki a17f2a6f05 Compiling/Installing : The CFGDIR parameter was removed. Use FILESDIR instead. 2019-08-17 10:53:07 +02:00
Daniel Marjamäki 0fbbe2ff23 Refactor load/write of cppcheck project. Reuse same string constants in cli and gui. 2019-08-09 21:15:02 +02:00
amai2012 b0fbbb5aa7 Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
Daniel Marjamäki ff5a23604f astyle formatting
[ci skip]
2019-07-29 22:40:53 +02:00
amai2012 24ad434c52 Refactoring: use enum class 2019-07-29 21:05:09 +02:00
Daniel Marjamäki 45d1ca6f7c Safe checks: Clarify a warning message 2019-07-25 17:19:51 +02:00
Daniel Marjamäki c8bc88e7e2 Fix compiler error 2019-07-23 13:14:08 +02:00
Daniel Marjamäki 7e3626c84e Travis: Check the naming conventions again 2019-07-15 20:58:07 +02:00
Daniel Marjamäki 8198bd5e8f Rename variables in threadexecutor according to our naming convention 2019-07-15 18:45:06 +02:00
Daniel Marjamäki 96a1c6dec5 Rename errorlist=>mShowAllErrors 2019-07-15 18:31:12 +02:00
Daniel Marjamäki a6194b81aa Rename _errorList=>mShownErrors 2019-07-15 18:29:09 +02:00
Daniel Marjamäki 5037ad3d42 Rename _settings=>mSettings 2019-07-15 18:24:27 +02:00
Daniel Marjamäki 0fa8a51815 Rename variable _files=>mFiles 2019-07-15 18:21:52 +02:00
Daniel Marjamäki 122ae198b7 Rename errorOutput=>mErrorOutput 2019-07-15 18:16:07 +02:00
Daniel Marjamäki 876d8c9829 Rename member variable exceptionOutput=>mExceptionOutput 2019-07-15 18:11:26 +02:00
IOBYTE c2ccfd5f8b Increase Windows stack size to 8M (#1998)
* Increase Windows stack size to 8M

* try to add stack size cmake
2019-07-15 12:39:58 +02:00
Daniel Marjamäki 783f7f1648 Rename safeValues to unknownValues 2019-07-11 16:05:48 +02:00
Daniel Marjamäki 05d35b063d Function return: Extra check of safe function return values 2019-07-10 20:00:21 +02:00
Daniel Marjamäki c9906125de Safe functions: Check more possible function argument values 2019-07-10 16:59:05 +02:00
PKEuS ae86536128 Updated to Visual Studio 2019 2019-07-06 12:11:19 +02:00
PKEuS d74f8c678f Set version to 1.88.99/1.89 dev 2019-07-02 20:59:52 +02:00
Scott Furry a195477470 Correct Zero/Null as pointer constant (#1938)
Building with enhanced clang warnings indicated a large number of
instances with the warning:

`warning: zero as null pointer constant`

Recommended practice in C++11 is to use `nullptr` as value for
a NULL or empty pointer value. All instances where this warning
was encountered were corrected in this commit.

Where warning was encountered in dependency code (i.e. external library)
no chnages were made. Patching will be offered upstream.
2019-06-30 21:39:22 +02:00
Daniel Marjamäki faaabc74a7 Set version 1.88 2019-06-29 08:38:13 +02:00
Daniel Marjamäki 84cc09d17c Update Copyright 2019-06-29 07:49:14 +02:00
Daniel Marjamäki 45d874bf75 Fixed #8929 ('cppcheck -E' should output valid/compileable code) 2019-05-11 14:00:42 +02:00
Daniel Marjamäki fe04c15c9e CheckStl: Modernize the recommendations. string::starts_with is more intuitive than string::compare 2019-05-05 10:35:44 +02:00
Daniel Marjamäki 7260bdd6d8 Fixed Cppcheck shadowVar warnings 2019-04-30 21:01:18 +02:00
Daniel Marjamäki b94f4176f1 test/cli: execute addon 2019-04-14 15:00:03 +02:00
Daniel Marjamäki a0dd853642 analyzing one vs config (first debug config that matches platform) 2019-04-13 20:01:40 +02:00
Daniel Marjamäki b04d1815ed Add -std=c++17 and allow semicolon in 'if ()' 2019-04-12 09:10:25 +02:00
Daniel Marjamäki cb06aebdab Removed --std=posix. From now on, if you use --library=posix then the posix checks will be enabled. 2019-04-12 06:47:28 +02:00
Daniel Marjamäki f6b410b469 GUI: add setting for 'checkHeaders', 'checkUnusedTemplates' and 'maxCtuDepth' to project 2019-04-10 16:49:24 +02:00
Daniel Marjamäki 58d88e149f Add --addon=<addon> command line option 2019-04-07 17:44:43 +02:00
Daniel Marjamäki 7ec8ce2ece --help: arguments should be written in alphabetical order 2019-04-07 13:20:23 +02:00
Daniel Marjamäki 111db91387 ImportProject: Import excluded paths properly 2019-04-07 12:31:52 +02:00
Daniel Marjamäki c04cc02ee5 Refactoring; Use range for loop 2019-04-07 12:07:47 +02:00
Oliver Stöneberg 8d7d93aea7 donate-cpu.py: improved error detection (#1766)
* threadexecutor.cpp: streamlined error messages

* donate-cpu.py: detect additional signals and exitcode != 0 as crash as well and (ab)use elapsedTime to make the errorcode visible in the output / also detect ThreadExecutor issues

* donate-cpu.py: bumped version

* donate-cpu.py: fixed detection of ThreadExecutor errors
2019-03-29 06:53:40 +01:00
Daniel Marjamäki a3257349b9 astyle formatting
[ci skip]
2019-03-17 10:50:06 +01:00
Daniel Marjamäki c7155a8e08 Removed '--experimental-fast' flag 2019-03-17 08:19:56 +01:00
Sebastian 08d41ab8af
Load std.cfg before all other libraries (#1740)
- CLI: Save the libraries that should be loaded to a list and load them
after the std.cfg has been loaded.
- GUI: Load std.cfg (and windows.cfg / posix.cfg when applicable) before
setting other options and loading the other libraries.
In the project-file-dialog the std.cfg is searched first. If some
other library fails to load is is retried with first loading std.cfg.
- boost.cfg: Enable containers that depend on std containers.
2019-03-15 06:59:37 +01:00
Daniel Marjamäki fda0f52424 Add --remove-unused-templates flag to remove all unused templates 2019-03-05 14:58:02 +01:00
Daniel Marjamäki e4249d3811 Clarify help text for --remove-unused-included-headers 2019-03-04 20:07:11 +01:00
Daniel Marjamäki 3675318208 Added --remove-unused-included-templates option 2019-03-04 19:10:49 +01:00
Daniel Marjamäki f5c274b3b1 Added '--check-headers=no' option. 2019-03-02 19:52:15 +01:00
PKEuS 11daabc1a8 Set version to 1.87.99/1.88 dev 2019-02-27 21:30:54 +01:00
Sebastian d1deff7c02 threadexecutor.h: Disable THREADING_MODEL_FORK for Cygwin (trac 8973) (#1670)
The fork implementation in Cygwin seems to be not very reliable.
See also the Cygwin documentation here: https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures
More details in the ticket https://trac.cppcheck.net/ticket/8973
2019-02-15 21:47:33 +01:00
Daniel Marjamäki 6717f49f20 Try to give some credit to the 3rd party libraries we use. 2019-02-10 17:16:53 +01:00
Daniel Marjamäki 4f232e41dd Add --experimental-fast option 2019-02-09 14:40:50 +01:00
Daniel Marjamäki 502d5e9142 1.87: Set versions 2019-02-09 09:07:27 +01:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki 437800f46d CLI: Added --max-ctu-depth 2019-02-03 17:51:36 +01:00
Daniel Marjamäki 961f66baff Fixed #8820 (import GUI project)
This has basic handling of GUI projects. But further work will be needed to handle addons etc, the plan is that we will be able to run addons from the command line soon.
2019-01-31 20:40:21 +01:00
Daniel Marjamäki d35a26c6f0 --check-library fix 2019-01-22 19:40:39 +01:00
Daniel Marjamäki 4119cfd3d1 Correct exit code when there are no unmatched suppressions 2019-01-21 20:33:22 +01:00
Daniel Marjamäki 0f19dfea82 Do not check unmatched suppressions in --check-library checking 2019-01-20 10:30:38 +01:00
Daniel Marjamäki 0945e827c6 Fixed #8931 (Missing error exitcode when an unmatched suppression is detected) 2019-01-19 21:42:01 +01:00
Paul Fultz II 9e4b605fca Properly find pcre (#1607) 2019-01-18 21:13:35 +01:00
IOBYTE f0cfe03f7b template simplifier: add cli --debug-template option to print the parsed template information (#1598) 2019-01-14 08:29:32 +01:00
Daniel Marjamäki ade18d978a Inline suppression for knownConditionTrueFalse FP 2019-01-13 13:18:35 +01:00
Daniel Marjamäki 900e26f651 Fix Cppcheck warning
[ci skip]
2019-01-13 13:06:51 +01:00
Daniel Marjamäki 792419a591 Use OVERRIDE macro in cli 2019-01-12 15:42:50 +01:00
Paul Fultz II 800076f9b8 Install to the correct cfgdir (#1593) 2019-01-12 08:05:03 +01:00
Daniel Marjamäki 5051744304 astyle formatting
[ci skip]
2019-01-09 19:47:46 +01:00
vahtis 5fc7fadf84 SunOs 11 compatibility with dirent (#1574)
* SunOs 11 compatibility issue solved. Member d_type is a BSD extension

* Added test for BSD also.

* Extra empty lines removed
2019-01-08 21:17:04 +01:00
Sebastian b51f19d530
Fix some doxygen warnings/issues in the comments (#1537) 2018-12-21 21:23:03 +01:00
PKEuS 886aa07ffb Set version to 1.86.99/1.87 dev 2018-12-08 11:53:37 +01:00
Daniel Marjamäki 5e527bdd08 Update version 2018-12-08 08:17:05 +01:00
amai2012 52d042fd48 Correct file size calculation 2018-11-30 23:18:51 +01:00
Daniel Marjamäki 895772711a 1.85: Set version 2018-10-13 18:55:19 +02:00
IOBYTE 24f2e288d5 Make --debug alias --debug-normal for backwards compatibility. (#1414) 2018-10-09 14:47:50 +02:00
orbitcowboy 361ae311f6 cmdlineparser: Stop processing in case an invalid path for --includes-file=<PATH> and --config-excludes-file=<PATH> is provided. 2018-09-04 16:37:43 +02:00
Kamil Dudka 0ca6ab1a71 ErrorLogger: add {cwe} (#1341) 2018-08-21 13:58:19 +02:00
Daniel Marjamäki 19af19b15e doxygen: Updated documentation shown on main page 2018-08-18 17:36:40 +02:00
Daniel Marjamäki 67e9a9cb25 naming convention conformance 2018-08-18 15:52:18 +02:00
Daniel Marjamäki 5ebfa035aa Updated variable names according to naming convention 2018-08-18 15:45:42 +02:00
Daniel Marjamäki ddbe4b89b5 Renamed --debug to --debug-simplified 2018-08-05 11:19:20 +02:00
firewave 01ceb9bae7 fixed issue 8661: Misleading error message when compilation database is not recognized 2018-07-25 16:26:25 +02:00