Skip to content

Commit 81d2c17

Browse files
committed
Merge branch 'main' into remove_unused_includes
2 parents c922f39 + 275f16a commit 81d2c17

860 files changed

Lines changed: 61424 additions & 27835 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.

‎.github/workflows/CI-cygwin.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
runs-on: ${{ matrix.os }}
3838

3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v6
4141
with:
4242
persist-credentials: false
4343

4444
- name: Set up Cygwin
45-
uses: cygwin/cygwin-install-action@master
45+
uses: cygwin/cygwin-install-action@v6
4646
with:
4747
site: https://mirrors.cicku.me/cygwin/
4848
platform: ${{ matrix.platform }}

‎.github/workflows/CI-mingw.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
timeout-minutes: 19 # max + 3*std of the last 7K runs
3434

3535
steps:
36-
- uses: actions/checkout@v4
36+
- uses: actions/checkout@v6
3737
with:
3838
persist-credentials: false
3939

@@ -49,7 +49,7 @@ jobs:
4949
mingw-w64-x86_64-gcc
5050
5151
- name: ccache
52-
uses: hendrikmuhs/ccache-action@v1.2
52+
uses: hendrikmuhs/ccache-action@v1.2.24
5353
with:
5454
key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}
5555

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
image: ${{ matrix.image }}
4444

4545
steps:
46-
- uses: actions/checkout@v4
46+
- uses: actions/checkout@v6
4747
with:
4848
persist-credentials: false
4949

@@ -66,13 +66,13 @@ jobs:
6666
# needs to be called after the package installation since
6767
# - it doesn't call "apt-get update"
6868
- name: ccache
69-
uses: hendrikmuhs/ccache-action@v1.2
69+
uses: hendrikmuhs/ccache-action@v1.2.24
7070
with:
7171
key: ${{ github.workflow }}-${{ matrix.image }}
7272

7373
- name: Run CMake
7474
run: |
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
75+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -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
7676
7777
- name: CMake build
7878
if: matrix.full_build
@@ -96,7 +96,7 @@ jobs:
9696
image: ${{ matrix.image }}
9797

9898
steps:
99-
- uses: actions/checkout@v4
99+
- uses: actions/checkout@v6
100100
with:
101101
persist-credentials: false
102102

@@ -114,7 +114,7 @@ jobs:
114114
# needs to be called after the package installation since
115115
# - it doesn't call "apt-get update"
116116
- name: ccache
117-
uses: hendrikmuhs/ccache-action@v1.2
117+
uses: hendrikmuhs/ccache-action@v1.2.24
118118
with:
119119
key: ${{ github.workflow }}-${{ matrix.image }}
120120

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

Lines changed: 47 additions & 38 deletions
Large diffs are not rendered by default.

‎.github/workflows/CI-windows.yml‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ${{ matrix.os }}
3232

3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v6
3535
with:
3636
persist-credentials: false
3737

@@ -47,29 +47,30 @@ jobs:
4747
modules: 'qtcharts'
4848
setup-python: 'false'
4949
cache: true
50-
aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available
5150

5251
- name: Run CMake
5352
run: |
5453
rem TODO: enable rules?
55-
rem specify Release build so matchcompiler is used
56-
cmake -S . -B build -Werror=dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DBUILD_TESTING=Off -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DBUILD_ONLINE_HELP=On -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
54+
cmake -S . -B build -Werror=dev --warn-uninitialized -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DBUILD_TESTING=Off -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DBUILD_ONLINE_HELP=On -DISABLE_DMAKE=On -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
5755
58-
- name: Build GUI release
56+
- name: Build GUI
5957
run: |
60-
cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel!
58+
cmake --build build --config Debug --target cppcheck-gui || exit /b !errorlevel!
6159
60+
# TODO: can this be done in CMake?
6261
- name: Deploy GUI
6362
run: |
64-
windeployqt build\bin\Release || exit /b !errorlevel!
65-
del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel!
66-
del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel!
63+
windeployqt --no-translations build\bin\Debug || exit /b !errorlevel!
64+
del build\bin\Debug\cppcheck-gui.pdb || exit /b !errorlevel!
6765
6866
# TODO: run GUI tests
6967

7068
- name: Run CMake install
7169
run: |
72-
cmake --build build --target install
70+
rem TODO: the Qt DLLs are not being installed
71+
cmake --build build --config Debug --target install
72+
rem TODO: validate the installed files
73+
rem TODO: the structure does not match an actual Windows installation
7374
7475
build_cmake_cxxstd:
7576
strategy:
@@ -81,7 +82,7 @@ jobs:
8182
runs-on: ${{ matrix.os }}
8283

8384
steps:
84-
- uses: actions/checkout@v4
85+
- uses: actions/checkout@v6
8586
with:
8687
persist-credentials: false
8788

@@ -92,7 +93,7 @@ jobs:
9293

9394
- name: Run CMake
9495
run: |
95-
cmake -S . -B build.cxxstd -Werror=dev -G "Visual Studio 17 2022" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
96+
cmake -S . -B build.cxxstd -Werror=dev --warn-uninitialized -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
9697
9798
- name: Build
9899
run: |
@@ -107,7 +108,7 @@ jobs:
107108
CMAKE_VERSION_FULL: 3.22.6
108109

109110
steps:
110-
- uses: actions/checkout@v4
111+
- uses: actions/checkout@v6
111112
with:
112113
persist-credentials: false
113114

@@ -128,17 +129,16 @@ jobs:
128129
modules: 'qtcharts'
129130
setup-python: 'false'
130131
cache: true
131-
aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available
132132

133133
- name: Run CMake (without GUI)
134134
run: |
135135
:: TODO: enable DHAVE_RULES?
136-
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output -G "Visual Studio 17 2022" -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On
136+
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On
137137
138138
- name: Run CMake (with GUI)
139139
run: |
140140
:: TODO: enable DHAVE_RULES?
141-
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output.gui -G "Visual Studio 17 2022" -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On
141+
cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output.gui -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On
142142
143143
build:
144144
strategy:
@@ -154,13 +154,13 @@ jobs:
154154
PCRE_VERSION: 8.45
155155

156156
steps:
157-
- uses: actions/checkout@v4
157+
- uses: actions/checkout@v6
158158
with:
159159
persist-credentials: false
160160

161161
- name: Set up Python
162162
if: matrix.config == 'release'
163-
uses: actions/setup-python@v5
163+
uses: actions/setup-python@v6
164164
with:
165165
python-version: '3.14'
166166
check-latest: true
@@ -172,7 +172,7 @@ jobs:
172172

173173
- name: Cache PCRE
174174
id: cache-pcre
175-
uses: actions/cache@v4
175+
uses: actions/cache@v5
176176
with:
177177
path: |
178178
externals\pcre.h
@@ -219,7 +219,7 @@ jobs:
219219

220220
- name: Run Debug test
221221
if: matrix.config == 'debug'
222-
run: .\bin\debug\testrunner.exe || exit /b !errorlevel!
222+
run: .\bin\debug\testrunner.exe -t || exit /b !errorlevel!
223223

224224
- name: Build CLI release configuration using MSBuild
225225
if: matrix.config == 'release'
@@ -272,7 +272,7 @@ jobs:
272272
- name: Test SEH wrapper
273273
if: matrix.config == 'release'
274274
run: |
275-
cmake -S . -B build.cmake.seh -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
275+
cmake -S . -B build.cmake.seh -Werror=dev --warn-uninitialized -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel!
276276
cmake --build build.cmake.seh --target test-sehwrapper || exit /b !errorlevel!
277277
:: TODO: how to run this without copying the file?
278278
copy build.cmake.seh\bin\Debug\test-sehwrapper.exe . || exit /b !errorlevel!

‎.github/workflows/asan.yml‎

Whitespace-only changes.

‎.github/workflows/buildman.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
convert_via_pandoc:
2020
runs-on: ubuntu-24.04
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2323
with:
2424
persist-credentials: false
2525

@@ -38,15 +38,15 @@ jobs:
3838
with:
3939
args: --output=output/manual-premium.pdf man/manual-premium.md
4040

41-
- uses: actions/upload-artifact@v4
41+
- uses: actions/upload-artifact@v7
4242
with:
4343
name: output
4444
path: output
4545

4646
manpage:
4747
runs-on: ubuntu-22.04
4848
steps:
49-
- uses: actions/checkout@v4
49+
- uses: actions/checkout@v6
5050
with:
5151
persist-credentials: false
5252

@@ -59,7 +59,7 @@ jobs:
5959
run: |
6060
make man
6161
62-
- uses: actions/upload-artifact@v4
62+
- uses: actions/upload-artifact@v7
6363
with:
6464
name: cppcheck.1
6565
path: cppcheck.1

‎.github/workflows/cifuzz.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
jobs:
1111
Fuzzing:
1212
runs-on: ubuntu-latest
13-
if: ${{ github.repository_owner == 'danmar' }}
13+
if: ${{ github.repository_owner == 'cppcheck-opensource' }}
1414
steps:
1515
- name: Build Fuzzers
1616
id: build
@@ -27,7 +27,7 @@ jobs:
2727
dry-run: false
2828
language: c++
2929
- name: Upload Crash
30-
uses: actions/upload-artifact@v4
30+
uses: actions/upload-artifact@v7
3131
if: failure() && steps.build.outcome == 'success'
3232
with:
3333
name: artifacts

‎.github/workflows/clang-tidy.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
QT_VERSION: 6.10.0
2828

2929
steps:
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@v6
3131
with:
3232
persist-credentials: false
3333

@@ -61,7 +61,7 @@ jobs:
6161
6262
- name: Prepare CMake
6363
run: |
64-
cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_COMPILE_WARNING_AS_ERROR=On
64+
cmake -S . -B cmake.output -Werror=dev --warn-uninitialized -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_COMPILE_WARNING_AS_ERROR=On
6565
env:
6666
CC: clang-22
6767
CXX: clang++-22
@@ -86,7 +86,7 @@ jobs:
8686
run: |
8787
cmake --build cmake.output --target run-clang-tidy-csa 2> /dev/null
8888
89-
- uses: actions/upload-artifact@v4
89+
- uses: actions/upload-artifact@v7
9090
if: success() || failure()
9191
with:
9292
name: Compilation Database
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Automated code review of pull requests using Claude
2+
#
3+
# A member/owner/collaborator requests a review by writing a PR comment
4+
# containing "@claude review".
5+
#
6+
# pull_request_target is not used because the Claude GitHub App token exchange
7+
# rejects OIDC tokens from that event (401 "Invalid OIDC token").
8+
#
9+
# issue_comment runs the workflow file from the default branch with access to
10+
# secrets. The PR code is never checked out or executed.
11+
name: claude-review
12+
13+
on:
14+
issue_comment:
15+
types: [created]
16+
17+
jobs:
18+
review:
19+
if: |
20+
github.event.issue.pull_request &&
21+
contains(github.event.comment.body, '@claude review') &&
22+
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)
23+
24+
runs-on: ubuntu-24.04
25+
26+
permissions:
27+
contents: read
28+
pull-requests: write
29+
id-token: write
30+
31+
steps:
32+
# checks out the base branch, not the PR head
33+
- uses: actions/checkout@v7
34+
with:
35+
fetch-depth: 1
36+
37+
- name: Claude review
38+
uses: anthropics/claude-code-action@v1
39+
with:
40+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
41+
prompt: |
42+
REPO: ${{ github.repository }}
43+
PR NUMBER: ${{ github.event.issue.number }}
44+
45+
Review this pull request. Focus on correctness bugs, potential
46+
false positives/false negatives in checkers, performance problems
47+
and missing tests. Be concise and only report real issues.
48+
49+
Use `gh pr diff` to see the changes. Post specific issues as inline
50+
comments with `mcp__github_inline_comment__create_inline_comment`
51+
and post a short overall summary with `gh pr comment`.
52+
claude_args: |
53+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"

0 commit comments

Comments
 (0)