Skip to content

Commit

Permalink
fix clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
LostPointer authored Aug 19, 2024
2 parents 35a7ea5 + 7ac94c5 commit d2e9154
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/clang-tidy-post.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: ZedThree/clang-tidy-review/post@v0.14.0
- uses: ZedThree/clang-tidy-review/post@v0.19.0
# lgtm_comment_body, max_comments, and annotations need to be set on the posting workflow in a split setup
with:
# adjust options as necessary
lgtm_comment_body: ''
annotations: false
max_comments: 15
17 changes: 9 additions & 8 deletions .github/workflows/clang-tidy-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Optionally generate compile_commands.json

- uses: ZedThree/clang-tidy-review@v0.14.0
- uses: ZedThree/clang-tidy-review@v0.19.0
with:
clang_tidy_checks: '-*,performance-*,bugprone-*,clang-analyzer-*,cppcoreguidelines-*,mpi-*,misc-*,-cppcoreguidelines-avoid-non-const-global-variables,-cppcoreguidelines-avoid-magic-numbers,-clang-diagnostic-error,-misc-no-recursion,-cppcoreguidelines-owning-memory,-bugprone-narrowing-conversions,-bugprone-easily-swappable-parameters,-misc-non-private-member-variables-in-classes,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-special-member-functions,-cppcoreguidelines-init-variables'
split_workflow: true

- uses: actions/upload-artifact@v3
with:
name: clang-tidy-review
path: |
clang-tidy-review-output.json
clang-tidy-review-metadata.json
# Uploads an artefact containing clang_fixes.json
- uses: ZedThree/clang-tidy-review/[email protected]
id: upload-review

# If there are any comments, fail the check
- if: steps.review.outputs.total_comments > 0
run: exit 1
2 changes: 0 additions & 2 deletions additional_tasks/template_task/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#include <iostream>

int main() { return 0; }

0 comments on commit d2e9154

Please sign in to comment.