Skip to content

Commit

Permalink
fixup! add clang-tidy pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftb0y committed Sep 10, 2024
1 parent ce7879d commit 2369daa
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ jobs:
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
git config --global --list
- name: "Create compile_commands.json"
# this is required for clang-tidy to work
run: |
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCLANG_TIDY=clang-tidy \
-DWARNINGS_FATAL=ON \
-DQT6=ON \
-DBATTERY=ON \
-DBROADCAST=ON \
-DBULK=ON \
-DHID=ON \
-DLILV=ON \
-DOPUS=ON \
-DQTKEYCHAIN=ON \
-DVINYLCONTROL=ON \
-DFFMPEG=ON \
-DKEYFINDER=ON \
-DLOCALECOMPARE=ON \
-DMAD=ON \
-DMODPLUG=ON \
-DWAVPACK=ON \
..
working-directory: build

- name: "Detect code style issues (push)"
uses: pre-commit/action@v3.0.1
Expand All @@ -44,7 +68,7 @@ jobs:
# disable these checks for now when pushing directly (but still run these
# on Pull Requests!).
env:
SKIP: clang-format,eslint,no-commit-to-branch
SKIP: clang-format,clang-tidy,eslint,no-commit-to-branch

- name: "Detect code style issues (pull_request)"
uses: pre-commit/action@v3.0.1
Expand Down

0 comments on commit 2369daa

Please sign in to comment.