Skip to content

Commit 844bfda

Browse files
committed
Add Cppcheck
1 parent 4911c3b commit 844bfda

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/cppcheck.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Cppcheck
2+
3+
on:
4+
push
5+
6+
jobs:
7+
check:
8+
9+
runs-on: windows-2025
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v5
14+
- name: Install Cppcheck
15+
run: winget install --id Cppcheck.Cppcheck --disable-interactivity --accept-source-agreements
16+
- name: Run Cppcheck
17+
run: |
18+
$env:Path += ";C:\Program Files (x86)\Cppcheck\"
19+
$config = @"
20+
<?xml version="1.0"?>
21+
<def>
22+
<define name="CoCreatableClass(className)" value="" />
23+
</def>
24+
"@
25+
Set-Content -Path "config.cfg" -Value $config
26+
cppcheck --check-level=exhaustive --error-exitcode=-1 --enable=all --suppress=missingIncludeSystem --suppress=unusedFunction --quiet --project=IExplorerCommand_CppWinRT\IExplorerCommand_CppWinRT.vcxproj
27+
cppcheck --check-level=exhaustive --error-exitcode=-1 --library=config.cfg --enable=all --suppress=missingIncludeSystem --suppress=unusedFunction --quiet --project=IExplorerCommand_WRL\IExplorerCommand_WRL.vcxproj

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Examples of implementing IExplorerCommand Windows File Explorer context menu she
1010

1111
## GitHub Actions status
1212

13-
[![Build](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/build.yml/badge.svg)](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/build.yml)
13+
[![Build](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/build.yml/badge.svg)](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/build.yml) [![Cppcheck](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/cppcheck.yml/badge.svg)](https://github.com/cjee21/IExplorerCommand-Examples/actions/workflows/cppcheck.yml)
1414

1515
## Other examples
1616

0 commit comments

Comments
 (0)