Commit Graph

96 Commits

Author SHA1 Message Date
Daniel Marjamäki 282c195a6f
Fix #12169 (False positive: wrong misra-config variable with accessing object in memory) (#5645) 2023-11-09 12:25:42 +01:00
Oliver Stöneberg 9280b5d7a5
CI-unixish.yml: removed `macos-11` builds and no longer build with qmake on MacOS (#5614)
Removed all `macos-11` builds as `brew` no longer supports it and we use
it in most steps:
```
Warning: You are using macOS 11.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.
```

Also `brew` might no longer provide pre-built Qt5 packages which will
cause the step to run for hours as it will compile it on demand - see
https://github.com/danmar/cppcheck/actions/runs/6735637341/job/18314354679
for such an instance.
2023-11-02 23:31:59 +01:00
Oliver Stöneberg fdb3de708e
fixed #12042 - deprecated building with Qt5 / build with Qt6 in CI / updated latest Qt in CI to 6.5.3 (#4957)
Qt 5.15 will be EOL on May 26 so we should start switching away from it.
We already have issues with many of the previous versions and qmake on
legacy distros so we should cut that off.

I will add a Qt6 release build for Windows in another PR so it can be
tested. We should switch to it as the delivered build after the next
release and stop using Qt5 altogether in the CI in the release
afterwards (that would get rid of several build steps). We could leave
it so you could still try to build it but no longer support it so it is
up to the user to get it to work before removing it completely later on.
2023-10-26 14:55:59 +02:00
Oliver Stöneberg 5bebdf8b97
added simplecpp source to selfcheck (#5432)
We do not have Cppcheck available in the simplecpp CI so we should check
it here.
2023-10-26 10:52:44 +02:00
Oliver Stöneberg 2f62e9d316
mitigated several compiler warnings / suppress compiler warnings in CI where we don't care about them (#5497)
There's no need to generate any warnings in the CI unless we react on
them.
2023-10-09 12:25:56 +02:00
Oliver Stöneberg fc700b68eb
refs #4452 / refs #11705 - improved `--showtime=` behavior and testing (#4876)
This is a step onto leveraging the `ThreadExecutor` implementation for
`ProcessExecutor` which is a follow-up to #4870. We need to have the
proper test coverage and the existing implementations working as
expected before we move to the shared code.

Fixes:
- added `--showtime=` tests for all executor implementations
- only print `--showtime=summary` once at the end
- prevents `--showtime=` by multiple threads to be written at the same
time - essentially breaking the output
- reset the timer results before each test
- deprecated `top5` in favor of `top5_file`
- fixed printing for all executors except `ProcessExecutor`
2023-10-05 19:04:06 +02:00
Oliver Stöneberg a3ff6d53c4
added `-Werror` to pytest calls and fixed reported warnings (#5483) 2023-09-26 15:31:37 +02:00
Oliver Stöneberg 176edbd22c
added `--strict` and `-vv` to pytest calls (#5453) 2023-09-18 13:57:27 +02:00
Oliver Stöneberg 9b3b477765
specify `gnu` library in selfcheck (#5436)
This should fix at least the following:
```
lib/color.cpp:33:43: debug: valueflow.cpp:10214:valueFlowConditionExpressions bailout: Skipping function due to incomplete variable STDOUT_FILENO [valueFlowBailoutIncompleteVar]
    static const bool stdout_tty = isatty(STDOUT_FILENO);
                                          ^
```
2023-09-11 19:59:58 +02:00
Oliver Stöneberg bf5e63300e
avoid duplicated workflow invocations for pushes in PRs made from root repository branches (#5377)
This will prevent duplicated workflows from being invoked for pushes
into pull requests made from branches in the root (`danmar`) repository
branches.
2023-09-01 18:52:20 +02:00
Daniel Marjamäki 7c992ced4c
Fixed #11901 (Performance regression: large array with strings) (#5375)
Analysis has slowed down a lot when there are many strings in an array.
2023-08-30 19:35:43 +02:00
Oliver Stöneberg d8b44dff56
fixed/suppressed several compiler warnings (#5327) 2023-08-16 19:35:53 +02:00
Oliver Stöneberg d076da8f7c
added missing `__GNUC__` define for selfcheck (#5324)
This was causing some code not to be enabled in the selfchecks leading
to some missing warnings.
2023-08-14 10:29:04 +02:00
Daniel Marjamäki 2cd1f0f387
misra: Fix crash in misra_9x when there is unknown constant used as array size (#5229) 2023-07-10 12:25:28 +02:00
chrchr-github f4030c4b1a
Fix #11791 Build regression with GCC 13 (#5193)
Patch supplied by Joachim Reichel.
2023-06-26 11:15:41 +02:00
Daniel Marjamäki 91dedf05b5
Fix #11793 (False positive: Misra addon crash for struct initialization when struct has a function pointer array) (#5190) 2023-06-25 11:37:49 +02:00
Andrew C Aitchison 0727528876
The threadsafety.py addon now flags MT-Unsafe symbols and functions. (#5086) 2023-06-08 14:46:09 +02:00
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
Oliver Stöneberg e6ae312a0b
moved more code into `HAVE_RULES` (#4956)
* moved more code into `HAVE_RULES`

* properly enable all internal and rules code in selfcheck

* updated TODOs in selfcheck

* testrunner.vcxproj.filters: updated

* added missing `Debug-PCRE` and `Release-PCRE` configurations for `testrunner` Visual Studio project

* cppcheck.cpp: fixed `useStlAlgorithm` selfcheck warning
2023-05-04 10:54:19 +02:00
Oliver Stöneberg b5ce2c708b
SingleExecutor: process markup files after code when scanning projects (#4972)
* SingleExecutor: added TODOs

* test `SingleExecutor` with files and project

* SingleExecutor: process markup files after code when scanning project

* TestSingleExecutor: generate scoped files before calling executor

* CI-unixish.yml: added `--output-on-failure` to CTest call

* helpers.cpp: improved error reporting in `~ScopedFile()`

* use unique filenames in executor tests to avoid collisions

* fixed `functionStatic` selfcheck warnings
2023-05-03 17:32:28 +02:00
Oliver Stöneberg 89b47e725f
CI-unixish.yml: added step to compile democlient (#4997)
* democlient.cpp: added missing copyright header

* CI-unixish.yml: added step to build democlient

* democlient.cpp: fixed GCC compiler warnings
2023-04-21 18:58:04 +02:00
Daniel Marjamäki 7726a5b5b3
Add a --check-level option (#4942) 2023-04-09 13:48:13 +02:00
Oliver Stöneberg 5ec0ad6bed
use `ccache` for sanitizer builds / do not use precompiled headers with `ccache` (#4910)
* added CMake option `DISABLE_DMAKE` to disable `run-dmake` dependencies

* tools/CMakeLists.txt: added TODO

* use `ccache` for sanitizer builds

* aligned selfcheck between sanitizer workflows and disabled some currently unnecessary steps

* CI-unixish.yml: do not use precompiled headers with `ccache`
2023-04-01 09:40:10 +02:00
Oliver Stöneberg 0b8af4fff7
some minor `QtCharts` usage cleanups (#4890) 2023-03-13 15:44:00 +01: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
Oliver Stöneberg 514e605598
CI-unixish.yml: fixed and enabled all `build` steps for macos (#4832) 2023-03-02 20:54:30 +01:00
Oliver Stöneberg 36192c50f6
removed unnecessary OSS-Fuzz related builds from CI (#4827) 2023-02-25 15:40:12 +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 01abf4c347
fixed macos build by manually installing `pcre` (#4597)
* Makefile: bail out if `pcre-config` is missing

* CI-unixish.yml: install `pcre` for `macos` via `brew` since it suddenly disappeared from the runner images
2022-11-25 15:11:57 +01:00
Oliver Stöneberg ca9747cf7d
address most Node.js 12 deprecation warnings in GitHub workflows (#4546) 2022-10-11 19:50:59 +02:00
Oliver Stöneberg 18db69c078
enabled Boost usage in optimized CI builds (#4512) 2022-09-27 18:49:18 +02:00
Oliver Stöneberg fd9d05300e
handle precompiled headers with `ccache` / fixed caching in some docker builds (#4505)
* CI-unixish.yml: handle precompiled headers with `ccache`

* actually support `ccache` in CMake < 3.17

* CI-unixish-docker.yml: split CMake build and test execution into separate steps

* findDependencies.cmake: only print message about macthcompiler being disabled when it is actually used

* CI-unixish-docker.yml: added missing `ccache` CMake options
2022-09-26 18:21:43 +02:00
Oliver Stöneberg b973a86ee1
include internal checks source in selfchecks and static analysis (#4503) 2022-09-24 22:14:04 +02:00
Oliver Stöneberg a536d53d62
CI-unixish.yml: actually perform qmake build on macos (#4418) 2022-09-15 20:26:21 +02: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
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 3d10e67b3d
CI-unixish.yml: use `ccache` for some macos builds / cleanups (#4439) 2022-09-05 21:36:53 +02:00
Oliver Stöneberg c433f906bc
use `ccache` for Linux gcc CMake CI builds (#4426)
* modernized some CMake invocations

* CI-unixish.yml: use `ccache` for Linux gcc CMake builds

* CI-unixish-docker.yml: use `ccache` for Linux gcc CMake builds

* CI-unixish-docker.yml: enabled CMake build with tests for more images

* CI-unixish-docker.yml: adjusted some step checks
2022-09-04 10:27:20 +02:00
Oliver Stöneberg 070bae871a
use `ccache` for Linux gcc make CI builds (#4411) 2022-09-03 21:21:24 +02:00
Oliver Stöneberg b7e5b702a4
CI-unixish.yml: split workflow into parallel jobs (#4417) 2022-09-02 15:56:17 +02:00
Oliver Stöneberg d26eb3903e
moved deprecated `ubuntu-18.04` from `CI-unixish.yml` to `CI-unixish-docker.yml` (#4409) 2022-08-27 15:05:40 +02:00
Oliver Stöneberg cf1271889a
reduced permissions of GitHub actions (#4403) 2022-08-26 23:25:07 +02:00
Oliver Stöneberg 467648bec6
fixed #11249 (potential hang with -j and --showtime= when using threads) - synchronized access to `TimerResults::mResults` / added TSAN to CI (#4355) 2022-08-23 20:30:45 +02:00
Daniel Marjamäki a64a5e1496 ci: remove macos-10.15 job, it has been deprecated 2022-07-21 19:14:17 +02:00
Oliver Stöneberg 703396e549
use `ubuntu-22.04` as main/base distro in CI (#4129) 2022-05-31 19:55:57 +02:00
Oliver Stöneberg 5e2afacdb9
Moved some stuff from Travis to GitHub Actions / Cleanups (#3715) 2022-05-31 19:53:50 +02:00
Oliver Stöneberg 8cd127aba8
CI-unixish.yml: added `macos-11` and `macos-12` (#4117) 2022-05-21 09:07:14 +02:00
Daniel Marjamäki 8dbc1b802a misra: fix crash 2022-05-17 22:15:49 +02:00
Oliver Stöneberg 1f9929c65f
always execute all selfcheck commands / aligned the selfcheck parameters and calls across jobs (#4108)
* always execute all selfcheck commands

* aligned the selfcheck parameters and calls across jobs
2022-05-13 06:52:20 +02:00
Oliver Stöneberg 56ac230e97
added strict cfg check (#4093)
* runtests.sh: added strict mode - enabled via `STRICT=1`

* CI-unixish.yml: added strict cfg check

* runtests.sh: disabled syntax check for kde.cpp since `kde-4config` is no longer commonly available in recent distros

* runtests.sh: disabled syntax check for opencv2.cpp since `opencv.pc` is not commonly available in distros

* runtests.sh: added missing trailing slash to `CFG` - fixes define checks
2022-05-10 13:03:58 +02:00