Skip to content

feat(silo): add codeql workflow #1

feat(silo): add codeql workflow

feat(silo): add codeql workflow #1

Workflow file for this run

name: clang-tidy
on: [pull_request]
jobs:
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang clang-tidy
- name: Configure
run: |
cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wconversion -Wnull-dereference -Werror"
- name: Build (to get compile_commands.json)
run: cmake --build build -j
- name: Run clang-tidy
run: |
checks='-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,cert-*'
clang-tidy -p build -warnings-as-errors="*" -header-filter='.*' $(jq -r '.[].file' build/compile_commands.json | sort -u) -checks="$checks"