-
Notifications
You must be signed in to change notification settings - Fork 16
42 lines (40 loc) · 1.29 KB
/
linters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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