Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/cpp_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ permissions: {}

jobs:
cpp_linter:
env:
CLANG_FORMAT_VERSION: 19
runs-on: ubuntu-latest
permissions:
# allow cpp-linter to post suggestions in PR reviews
Expand All @@ -30,7 +32,7 @@ jobs:
with:
python-version: 3.x
- name: Install clang-format
run: sudo apt-get install clang-format-14
run: sudo apt-get install -y clang-format-${CLANG_FORMAT_VERSION}
- name: Install linter python package
run: python3 -m pip install 'cpp-linter>=1.7.1'
- name: Run cpp-linter (python package)
Expand All @@ -41,7 +43,7 @@ jobs:
EXTENSIONS: ${{ inputs.extensions }}
run: >-
cpp-linter
--version=14
--version=${CLANG_FORMAT_VERSION}
--style=file
--tidy-checks='-*'
--lines-changed-only=true
Expand All @@ -52,4 +54,8 @@ jobs:
--step-summary=true
- name: Linter checks failed?
if: steps.linter.outputs.checks-failed > 0
run: exit 1
env:
CHECKS_FAILED: ${{ steps.linter.outputs.checks-failed }}
run: |-
echo "format checks failed: ${CHECKS_FAILED}"
exit 1