Skip to content

Commit

Permalink
Merge pull request #2745 from MRtrix3/clang-tidy
Browse files Browse the repository at this point in the history
Integration of clang-tidy in CI
  • Loading branch information
daljit46 authored Nov 6, 2023
2 parents f10198a + 01d4667 commit 862142d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Checks: >
-*,
bugprone-*,
clang-analyzer-*,
concurrency-*,
cppcoreguidelines-*,
misc-*,
performance-*,
portability-*,
readability-*,
-bugprone-easily-swappable-parameters,
-cppcoreguidelines-avoid-magic-numbers,
-readability-braces-around-statements,
-readability-identifier-length,
-readability-magic-numbers,
HeaderFilterRegex: '*.(h|hpp)'
18 changes: 18 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: clang-tidy-review

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ZedThree/[email protected]
id: review
with:
apt_packages: g++,libqt5opengl5-dev,libqt5svg5-dev,libglvnd-dev,libeigen3-dev,zlib1g-dev,libfftw3-dev,ninja-build
cmake_command: cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=on

- uses: ZedThree/clang-tidy-review/[email protected]
id: upload-review
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ add_custom_target(Github SOURCES
.github/workflows/package-macos-anaconda.yml
.github/workflows/package-macos-native.yml
.github/workflows/package-windows-msys2.yml
.github/workflows/clang-tidy.yml
)

0 comments on commit 862142d

Please sign in to comment.