Skip to content

⬆️🪝 update pre-commit hooks #364

⬆️🪝 update pre-commit hooks

⬆️🪝 update pre-commit hooks #364

Workflow file for this run

name: cpp-linter
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install boost
run: sudo apt-get update && sudo apt-get -y install libboost-all-dev
- name: Generate compilation database
run: CC=clang-14 CXX=clang++-14 cmake -S . -B build -DBINDINGS=ON -DBUILD_SYREC_TESTS=ON
- name: Run cpp-linter
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pipx run cpp-linter \
--version=14 \
--style="file" \
--tidy-checks="" \
--thread-comments=true \
--files-changed-only=true \
--ignore="build" \
--database=build
- name: Fail if linter found errors
if: steps.linter.outputs.checks-failed > 0
run: echo "Linter found errors" && exit 1