Skip to content

Commit

Permalink
ci: use cpp-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
futrime committed Jan 27, 2024
1 parent d5976cb commit 3e12a96
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: |
choco install llvm -y --version=17.0.6
- name: clang-format
run: |
Get-ChildItem src/ -Filter *.cpp -Recurse | ForEach-Object { clang-format -i -Werror $_.FullName }
Get-ChildItem src/ -Filter *.h -Recurse | ForEach-Object { clang-format -i -Werror $_.FullName }
- id: cpp-linter-action
uses: cpp-linter/cpp-linter-action@v2
with:
style: file
tidy-checks: ''
version: 17

- name: clang-tidy
- if: ${{ steps.cpp-linter-action.outputs.checks-failed > 0 }}
run: |
Get-ChildItem src/ -Filter *.cpp -Recurse | ForEach-Object { clang-tidy -p build -header-filter=src/ $_.FullName }
Get-ChildItem src/ -Filter *.h -Recurse | ForEach-Object { clang-tidy -p build -header-filter=src/ $_.FullName }
exit 1

0 comments on commit 3e12a96

Please sign in to comment.