Skip to content

Minor updates

Minor updates #92

Workflow file for this run

name: cpp-linter
on:
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
cpp-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Catch2 v3 from source
run: |
git clone https://github.com/catchorg/Catch2.git
cd Catch2
git checkout v3.5.2
cmake -Bbuild -S. -DBUILD_TESTING=OFF
sudo cmake --build build/ --target install
cd ../
rm -rf Catch2
- name: Make compile_commands.json
run: |
cmake --preset gh-coverage
- name: cpp-lint
uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
version: 15
files-changed-only: false
tidy-checks: "bugprone-*,performance-*,readability-*,portability-*,clang-analyzer-*,cpp-coreguidelines-*,modernize-a*,modernize-c*,modernize-d*,modernize-l*,modernize-m*,modernize-p*,modernize-r*,modernize-s*,modernize-t*,modernize-un*,modernize-use-a*,modernize-use-b*,modernize-use-c*,modernize-use-d*,modernize-use-e*,modernize-use-n*,modernize-use-o*,modernize-use-s*,modernize-use-tran*,modernize-use-u*"
database: "build/debug/gh-coverage/compile_commands.json"
ignore: "build/debug/gh-coverage/_deps | build/debug/gh-coverage/CMakeFiles | src/tests/ | Catch2/ | src/benchmark.cpp | src/util.hpp | .github"
extra-args: "-std=c++20"
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail?
if: steps.linter.outputs.checks-failed > 0
run: exit 1