Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Marjamäki 6b9fac41f4
Fixed #11734 (stylistic warnings from addons are not filtered when style is not enabled) (#5091) 2023-05-27 10:24:00 +02:00
Daniel Marjamäki f52c00c3a7 fixed CI. I remove dump files in cppcheck build dir after analysis. 2023-04-07 19:02:34 +02: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
Michael Drake d651b6baf1
dump: Fix concurrency problem with dump files (#4757)
* dump: Fix concurrency problem with dump files

This adds the process ID for the cppcheck process to the filenames
of the .dump and .ctu-info files that the process generates.

So
  lib/cppcheck.cpp.dump
becomes
  lib/cppcheck.cpp.<PID>.dump

For example:
  lib/cppcheck.cpp.2637871.dump

The reason for this change is that if there is a buildsystem which
supports concurrency, multiple instances of cppcheck may be run for
the same file.  For example, if the same file is compiled in multiple
build variants, or for multiple targets.

If running the MISRA plugin over such a project with concurrency
enabled in the buildsystem, the plugin ends up crashing as multiple
jobs attempt to create/trample/delete the same files while other
jobs are using them.

For more information see:
    https://sourceforge.net/p/cppcheck/discussion/general/thread/02c757b4af/

* dump: Include pid in filename if dump not explicit

Only change the dump and ctu-info filenames to include the PID if
they are being generated due to an addon.

This means that existing scripts that use `--dump` will still work
if they depend on the previous naming behaviour. The more robust
filenames containing the pid will be used when the dump files are
used as an internal implementation detail for passing data to addons.

However this means that anything that does explicitly use `--dump`
will be susceptible to concurrency problems.

* test: Update addon dump file test to account for pid

This test causes a dump file to be created by enabling the misra
addon. Since the dump files now include the cppcheck process pid
this test had to be updated to account for the change.
2023-02-13 20:54:21 +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 54771306c5
selfcheck : cleaned up some suppressions, fixed warnings and some cleanups (#4436)
* cleaned up triage.pro and pass all triage files to selfcheck

* CI-unixish.yml: factored out redundant selfcheck flags

* CI-unixish.yml: cleaned up selfcheck suppressions and fixed warnings

* added explicit `missingInclude` checks to selfcheck to work around current issues/limitations / fixed selfcheck includes / added some unit tests for `missingInclude`

* applied the selfcheck changes to the sanitizer jobs

* only fail TSAN CI build in case of TSAN error / updated sanitizer CI build TODOs
2022-09-06 23:11:39 +02:00
Daniel Marjamäki 8255e32540 cppcheck build dir: do not produce invalid dump file if code is unchanged and checking is skipped. 2022-06-12 11:08:28 +02:00
Oliver Stöneberg 61a2b89034
streamlined message/error printing of CmdLineParser (#3524)
* cmdlineparser.cpp: removed message about deprecated --std=posix

* streamlined message/error printing of CmdLineParser

* test-helloworld.py: adjusted expected test result
2021-10-30 13:30:48 +02:00
Oliver Stöneberg 052de79b6d
some test/CI related refactoring and cleanup (#3163) 2021-04-03 21:22:39 +02:00
Oliver Stöneberg b472b4e65d
some Python cleanups based on PyCharm inspections (#2999)
* some Python cleanups based on PyCharm inspections

* test-helloworld.py: adjusted assert in test_addon_relative_path()
2021-01-31 14:27:11 +01:00
Daniel Marjamäki 81fff2edf1 Fixed #9464 (Import compile database; only check given configuration) 2019-11-09 17:51:42 +01:00
Daniel Marjamäki 8855978f8a Import project: Ignoring paths better 2019-09-12 09:32:24 +02:00
Daniel Marjamäki d95f29b23a Fixed test/cli 2019-08-18 12:51:32 +02:00
Daniel Marjamäki de9c999d79 Better handling of spaces in paths 2019-06-22 19:20:15 +02:00
Daniel Marjamäki 7900902ad9 Renamed 1-helloworld helloworld 2019-05-03 20:22:35 +02:00
Daniel Marjamäki 9a563a7d60 test/cli: Add test for cppcheck gui project with addons 2019-04-15 20:02:17 +02:00
Daniel Marjamäki 83f8d7fab9 test/cli: Improved proj2 testing. fixed bug for relative path when vs-solution is imported with relative path 2019-04-15 19:00:57 +02:00
Daniel Marjamäki 6549aed6f4 test/cli: Added testutils.py 2019-04-15 16:57:16 +02:00
Daniel Marjamäki a03455c505 test/cli: test function that creates gui project file 2019-04-15 15:03:06 +02:00
Daniel Marjamäki 58f886c725 test/cli: Add tests for suppressions 2019-04-15 11:11:33 +02:00
Daniel Marjamäki 65d18b3da9 test/cli: refactorings 2019-04-15 10:02:25 +02:00
Daniel Marjamäki 57479dc948 test/cli: importing cppcheck gui project that imports vcxproj 2019-04-14 18:21:27 +02:00
Daniel Marjamäki 7a122cc846 test/cli: import vs project with absolute path 2019-04-14 18:09:35 +02:00
Daniel Marjamäki fd0309db9b test/cli: Add tests that loads vs project 2019-04-14 16:48:59 +02:00
Daniel Marjamäki a18025c95d test/cli: tweaks for running it in windows 2019-04-14 15:53:32 +02:00
Daniel Marjamäki b94f4176f1 test/cli: execute addon 2019-04-14 15:00:03 +02:00
Daniel Marjamäki 6a83c5d3f3 Add cli testing 2019-04-14 10:46:47 +02:00