Skip to content

Commit

Permalink
check our code with clang-tidy
Browse files Browse the repository at this point in the history
should allow to keep our code tidy and maybe simplify reviews

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Sep 30, 2022
1 parent 6f99c04 commit 494c262
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: clang-tidy-review

# You can be more specific, but it currently only works on pull requests
on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

# Optionally generate compile_commands.json

- uses: ZedThree/clang-tidy-review@v0.9.0
id: review
with:
# List of packages to install
apt_packages: zlib1g-dev,texlive-latex-base,qtwebengine5-dev,qttools5-dev-tools,qttools5-dev,qtquickcontrols2-5-dev,qtkeychain-qt5-dev,qtdeclarative5-dev,qtbase5-dev,python3-sphinx,libssl-dev,libsqlite3-dev,libqt5websockets5-dev,libqt5svg5-dev

# CMake command to run in order to generate compile_commands.json
cmake_command: cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DBUILD_UPDATER=ON -DBUILD_TESTING=1

clang_tidy_version: 12

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

0 comments on commit 494c262

Please sign in to comment.