Skip to content

[CQT-190] [Infra] Add clang-tidy #26

[CQT-190] [Infra] Add clang-tidy

[CQT-190] [Infra] Add clang-tidy #26

Workflow file for this run

name: Linters
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
cpp-linters:
name: "C++ linters"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build C++ tests (gcc-clang/Linux/x64)
uses: ./.github/actions/cpp-tests
with:
build_type: Release
conan_profile_host: conan/profiles/tests-release-gcc-linux-x64
shell: bash
- name: Run C++ linters
uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
database: '${{ github.workspace }}/build/Release'
extensions: 'cpp,hpp'
ignore: 'emscripten/emscripten_wrapper.hpp'
style: 'file' # use .clang-format config file
tidy-checks: '' # use .clang-tidy config file
version: 18
- name: Fail fast
if: steps.linter.outputs.checks-failed > 0
run: |
echo "::notice::Try running the following commands to fix and/or understand linter issues:"
echo "::notice:: conan build . -pr:a=conan/profiles/tests-release-gcc-linux-x64 -b missing"
echo "::notice:: python3 ./scripts/run_cpp_linters.py ."
exit 1