Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Checks: >
-*,
clang-analyzer-*,
clang-diagnostic-*,
bugprone-*,
performance-*
WarningsAsErrors: '*'
# Only analyze headers from this repository; ignore external headers
HeaderFilterRegex: '^(include/|test/(?!third_party/))'
FormatStyle: file
...
25 changes: 25 additions & 0 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: clang-tidy-review

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Optionally generate compile_commands.json
- uses: ZedThree/clang-tidy-review@v0.21.0
id: review
with:
cmake_command: cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
build_dir: build

# Uploads an artefact containing clang_fixes.json
- uses: ZedThree/clang-tidy-review/upload@v0.21.0
id: upload-review

# If there are any comments, fail the check
- if: steps.review.outputs.total_comments > 0
run: exit 1