Skip to content

Commit 7a1f85a

Browse files
Merge branch 'danmar:main' into chr_qdir
2 parents 44ad6a1 + b52fd48 commit 7a1f85a

769 files changed

Lines changed: 95596 additions & 46365 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ Checks: >
1818
-objc-*,
1919
-openmp-*,
2020
-zircon-*,
21-
cert-err34-c,
22-
google-explicit-constructor,
21+
cppcoreguidelines-pro-type-static-cast-downcast,
2322
cppcoreguidelines-rvalue-reference-param-not-moved,
23+
google-explicit-constructor,
2424
-bugprone-assignment-in-if-condition,
2525
-bugprone-branch-clone,
26+
-bugprone-command-processor,
2627
-bugprone-easily-swappable-parameters,
2728
-bugprone-empty-catch,
2829
-bugprone-macro-parentheses,
2930
-bugprone-narrowing-conversions,
3031
-bugprone-signed-char-misuse,
3132
-bugprone-switch-missing-default-case,
33+
-bugprone-throwing-static-initialization,
3234
-bugprone-unchecked-optional-access,
3335
-clang-analyzer-*,
3436
-concurrency-mt-unsafe,
@@ -40,40 +42,53 @@ Checks: >
4042
-modernize-avoid-c-arrays,
4143
-modernize-deprecated-ios-base-aliases,
4244
-misc-include-cleaner,
45+
-misc-multiple-inheritance,
4346
-misc-unused-using-decls,
47+
-modernize-avoid-c-style-cast,
4448
-modernize-loop-convert,
4549
-modernize-macro-to-enum,
4650
-modernize-raw-string-literal,
4751
-modernize-replace-auto-ptr,
4852
-modernize-return-braced-init-list,
4953
-modernize-type-traits,
50-
-modernize-use-auto,
54+
-modernize-use-designated-initializers,
5155
-modernize-use-nodiscard,
56+
-modernize-use-scoped-lock,
5257
-modernize-use-trailing-return-type,
5358
-performance-avoid-endl,
54-
-performance-enum-size,
5559
-performance-inefficient-string-concatenation,
5660
-performance-no-automatic-move,
57-
-performance-noexcept-swap,
61+
-portability-avoid-pragma-once,
5862
-portability-simd-intrinsics,
5963
-portability-std-allocator-const,
60-
-readability-avoid-const-params-in-decls,
6164
-readability-avoid-nested-conditional-operator,
6265
-readability-braces-around-statements,
6366
-readability-container-data-pointer,
67+
-readability-enum-initial-value,
6468
-readability-function-cognitive-complexity,
6569
-readability-function-size,
6670
-readability-identifier-length,
6771
-readability-identifier-naming,
6872
-readability-implicit-bool-conversion,
73+
-readability-inconsistent-ifelse-braces,
6974
-readability-isolate-declaration,
7075
-readability-magic-numbers,
76+
-readability-redundant-parentheses,
7177
-readability-suspicious-call-argument,
72-
-readability-uppercase-literal-suffix
78+
-readability-uppercase-literal-suffix,
79+
-readability-use-concise-preprocessor-directives,
80+
-misc-unconventional-assign-operator
7381
WarningsAsErrors: '*'
74-
HeaderFilterRegex: '(cli|gui|lib|oss-fuzz|test|triage)\/[a-z]+\.h'
82+
HeaderFilterRegex: '(cli|gui|frontend|lib|oss-fuzz|test|triage)\/[a-z_]+\.h'
83+
ExcludeHeaderFilterRegex: 'ui_.*.h'
7584
CheckOptions:
7685
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
7786
value: '1'
7887
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
7988
value: '0'
89+
- key: modernize-use-trailing-return-type.TransformFunctions
90+
value: false
91+
- key: misc-override-with-different-visibility.DisallowedVisibilityChange
92+
value: widening
93+
- key: misc-use-internal-linkage.AnalyzeTypes
94+
value: false

.github/workflows/CI-cygwin.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- 'main'
99
- 'releases/**'
10+
- '2.*'
1011
tags:
1112
- '2.*'
1213
pull_request:
@@ -19,11 +20,13 @@ defaults:
1920
shell: cmd
2021

2122
jobs:
23+
# TODO: add CMake build
2224
build_cygwin:
2325
strategy:
2426
matrix:
25-
os: [windows-2022]
26-
arch: [x64]
27+
# only use the latest windows-* as the installed toolchain is identical
28+
os: [windows-2025]
29+
platform: [x86_64]
2730
include:
2831
- platform: 'x86_64'
2932
packages: |
@@ -34,18 +37,21 @@ jobs:
3437
runs-on: ${{ matrix.os }}
3538

3639
steps:
37-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
3843

3944
- name: Set up Cygwin
4045
uses: cygwin/cygwin-install-action@master
4146
with:
42-
platform: ${{ matrix.arch }}
47+
site: https://mirrors.cicku.me/cygwin/
48+
platform: ${{ matrix.platform }}
4349
packages: ${{ matrix.packages }}
4450

4551
# Cygwin will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries.
4652
- name: Build all and run test
4753
run: |
48-
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j2 check
54+
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j%NUMBER_OF_PROCESSORS% CXXOPTS="-Werror" test
4955
5056
- name: Extra test for misra
5157
run: |

.github/workflows/CI-mingw.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches:
88
- 'main'
99
- 'releases/**'
10+
- '2.*'
1011
tags:
1112
- '2.*'
1213
pull_request:
@@ -19,53 +20,56 @@ defaults:
1920
shell: msys2 {0}
2021

2122
jobs:
23+
# TODO: add CMake build
2224
build_mingw:
2325
strategy:
2426
matrix:
25-
# the MinGW installation in windows-2019 is supposed to be 8.1 but it is 12.2
26-
# the MinGW installation in windows-2022 is not including all necessary packages by default, so just use the older image instead - package versions are he same
27-
os: [windows-2019]
27+
# only use the latest windows-* as the installed toolchain is identical
28+
os: [windows-2025]
2829
fail-fast: false
2930

3031
runs-on: ${{ matrix.os }}
3132

33+
timeout-minutes: 19 # max + 3*std of the last 7K runs
34+
3235
steps:
33-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
3439

3540
- name: Set up MSYS2
3641
uses: msys2/setup-msys2@v2
3742
with:
3843
release: false # use pre-installed
44+
# TODO: install mingw-w64-x86_64-make and use mingw32.make instead - currently fails with "Windows Subsystem for Linux has no installed distributions."
3945
install: >-
4046
mingw-w64-x86_64-lld
4147
mingw-w64-x86_64-ccache
48+
make
49+
mingw-w64-x86_64-gcc
4250
4351
- name: ccache
44-
uses: hendrikmuhs/ccache-action@v1.2.11
52+
uses: hendrikmuhs/ccache-action@v1.2
4553
with:
4654
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
4755

48-
# TODO: bail out on warning
4956
- name: Build cppcheck
5057
run: |
5158
export PATH="/mingw64/lib/ccache/bin:$PATH"
5259
# set RDYNAMIC to work around broken MinGW detection
53-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 cppcheck
54-
env:
55-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
60+
# use lld for faster linking
61+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" cppcheck
5662
5763
- name: Build test
5864
run: |
5965
export PATH="/mingw64/lib/ccache/bin:$PATH"
6066
# set RDYNAMIC to work around broken MinGW detection
61-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 testrunner
62-
env:
63-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
67+
# use lld for faster linking
68+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" testrunner
6469
6570
- name: Run test
6671
run: |
6772
export PATH="/mingw64/lib/ccache/bin:$PATH"
6873
# set RDYNAMIC to work around broken MinGW detection
69-
make VERBOSE=1 RDYNAMIC=-lshlwapi -j2 check
70-
env:
71-
LDFLAGS: -fuse-ld=lld # use lld for faster linking
74+
# use lld for faster linking
75+
make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" test

.github/workflows/CI-unixish-docker.yml

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,29 @@ on:
77
branches:
88
- 'main'
99
- 'releases/**'
10+
- '2.*'
1011
tags:
1112
- '2.*'
1213
pull_request:
1314

1415
permissions:
1516
contents: read
16-
17+
1718
jobs:
1819
build_cmake:
1920

2021
strategy:
2122
matrix:
22-
image: ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:24.04"]
2323
include:
24-
- build_gui: false
2524
- image: "ubuntu:24.04"
26-
build_gui: true
25+
with_gui: true
26+
full_build: true
27+
- image: "ubuntu:25.10"
28+
with_gui: true
29+
full_build: true
30+
- image: "alpine:3.23"
31+
with_gui: false # it appears FindQt6.cmake is not provided by any package
32+
full_build: false # FIXME: test-signalhandler.cpp fails to build since feenableexcept() is missing
2733
fail-fast: false # Prefer quick result
2834

2935
runs-on: ubuntu-22.04
@@ -37,7 +43,9 @@ jobs:
3743
image: ${{ matrix.image }}
3844

3945
steps:
40-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
47+
with:
48+
persist-credentials: false
4149

4250
- name: Install missing software on ubuntu
4351
if: contains(matrix.image, 'ubuntu')
@@ -46,53 +54,40 @@ jobs:
4654
apt-get install -y cmake g++ make libxml2-utils libpcre3-dev
4755
4856
- name: Install missing software (gui) on latest ubuntu
49-
if: matrix.build_gui
57+
if: contains(matrix.image, 'ubuntu')
5058
run: |
5159
apt-get install -y qt6-base-dev qt6-charts-dev qt6-tools-dev
5260
61+
- name: Install missing software on Alpine
62+
if: contains(matrix.image, 'alpine')
63+
run: |
64+
apk add cmake make g++ pcre-dev
65+
5366
# needs to be called after the package installation since
5467
# - it doesn't call "apt-get update"
55-
# - it doesn't support centos
56-
#
57-
# needs to be to fixated on 1.2.11 so it works with older images - see https://github.com/hendrikmuhs/ccache-action/issues/178
5868
- name: ccache
59-
uses: hendrikmuhs/ccache-action@v1.2.11
69+
uses: hendrikmuhs/ccache-action@v1.2
6070
with:
6171
key: ${{ github.workflow }}-${{ matrix.image }}
6272

63-
# tests require CMake 3.9 - ccache available
64-
- name: CMake build (no tests)
65-
if: matrix.image == 'ubuntu:16.04'
73+
- name: Run CMake
6674
run: |
67-
mkdir cmake.output
68-
cd cmake.output
69-
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
70-
cmake --build . -- -j$(nproc)
75+
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=${{ matrix.with_gui }} -DWITH_QCHART=On -DBUILD_TRIAGE=${{ matrix.with_gui }} -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
7176
7277
- name: CMake build
73-
if: ${{ !matrix.build_gui && matrix.image != 'ubuntu:16.04' }}
74-
run: |
75-
mkdir cmake.output
76-
cd cmake.output
77-
cmake -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
78-
cmake --build . -- -j$(nproc)
79-
80-
- name: CMake build (with GUI)
81-
if: matrix.build_gui
78+
if: matrix.full_build
8279
run: |
83-
cmake -S . -B cmake.output -G "Unix Makefiles" -DHAVE_RULES=On -DBUILD_TESTS=On -DBUILD_GUI=On -DUSE_QT6=On -DWITH_QCHART=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
8480
cmake --build cmake.output -- -j$(nproc)
8581
8682
- name: Run CMake test
87-
if: matrix.image != 'ubuntu:16.04'
8883
run: |
8984
cmake --build cmake.output --target check -- -j$(nproc)
9085
9186
build_make:
9287

9388
strategy:
9489
matrix:
95-
image: ["ubuntu:16.04", "ubuntu:18.04", "ubuntu:24.04"]
90+
image: ["ubuntu:24.04", "ubuntu:25.10", "alpine:3.23"]
9691
fail-fast: false # Prefer quick result
9792

9893
runs-on: ubuntu-22.04
@@ -101,44 +96,48 @@ jobs:
10196
image: ${{ matrix.image }}
10297

10398
steps:
104-
- uses: actions/checkout@v3
99+
- uses: actions/checkout@v4
100+
with:
101+
persist-credentials: false
105102

106103
- name: Install missing software on ubuntu
107104
if: contains(matrix.image, 'ubuntu')
108105
run: |
109106
apt-get update
110107
apt-get install -y g++ make python3 libxml2-utils libpcre3-dev
111108
109+
- name: Install missing software on Alpine
110+
if: contains(matrix.image, 'alpine')
111+
run: |
112+
apk add make g++ pcre-dev bash python3 libxml2-utils
113+
112114
# needs to be called after the package installation since
113115
# - it doesn't call "apt-get update"
114-
# - it doesn't support centos
115-
#
116-
# needs to be to fixated on 1.2.11 so it works with older images - see https://github.com/hendrikmuhs/ccache-action/issues/178
117116
- name: ccache
118-
uses: hendrikmuhs/ccache-action@v1.2.11
117+
uses: hendrikmuhs/ccache-action@v1.2
119118
with:
120119
key: ${{ github.workflow }}-${{ matrix.image }}
121120

121+
# /usr/lib/ccache/bin - Alpine Linux
122+
122123
- name: Build cppcheck
123124
run: |
124-
# "/usr/lib64" for centos / "/usr/lib" for ubuntu
125-
export PATH="/usr/lib64/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
126-
make -j$(nproc) HAVE_RULES=yes CXXFLAGS="-w"
125+
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
126+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror"
127127
128128
- name: Build test
129129
run: |
130-
# "/usr/lib64" for centos / "/usr/lib" for ubuntu
131-
export PATH="/usr/lib64/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
132-
make -j$(nproc) testrunner HAVE_RULES=yes CXXFLAGS="-w"
130+
export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
131+
make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" testrunner
133132
134133
- name: Run test
135134
run: |
136-
make -j$(nproc) check HAVE_RULES=yes
135+
make -j$(nproc) HAVE_RULES=yes test
137136
138137
# requires python3
139138
- name: Run extra tests
140139
run: |
141-
tools/generate_and_run_more_tests.sh
140+
test/scripts/generate_and_run_more_tests.sh
142141
143142
# requires which
144143
- name: Validate
@@ -149,10 +148,3 @@ jobs:
149148
run: |
150149
./cppcheck --addon=threadsafety addons/test/threadsafety
151150
./cppcheck --addon=threadsafety --std=c++03 addons/test/threadsafety
152-
153-
- name: Generate Qt help file on ubuntu 18.04
154-
if: false # matrix.os == 'ubuntu-18.04'
155-
run: |
156-
pushd gui/help
157-
qcollectiongenerator online-help.qhcp -o online-help.qhc
158-

0 commit comments

Comments
 (0)