Skip to content

Commit

Permalink
🚸 improve cpp-linter configuration (#1)
Browse files Browse the repository at this point in the history
* 🚸 allow to request a full clang-tidy check via an option

Setting `files-changed-only: false` on the reusable workflow will trigger clang-tidy to run on all files

* 🔧 update clang-tidy review comments instead of posting new ones

* 🔥 remove release drafter validation
  • Loading branch information
burgholzer committed May 24, 2024
1 parent a563bbd commit 2df0b74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/reusable-cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
description: "Clang version to use"
default: 18
type: number
files-changed-only:
description: "Whether to only lint files that have changed"
default: true
type: boolean
cmake-args:
description: "Additional arguments to pass to CMake"
default: ""
Expand Down Expand Up @@ -71,11 +75,11 @@ jobs:
tidy-checks: ""
version: ${{ env.clang-version }}
ignore: "build|include/python|src/python"
thread-comments: ${{ github.event_name == 'pull_request' }}
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
step-summary: true
database: "build"
extra-args: -std=c++17
files-changed-only: true
files-changed-only: ${{ inputs.files-changed-only }}
- name: Fail if linter found errors
if: steps.linter.outputs.checks-failed > 0
run: echo "Linter found errors" && exit 1
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,3 @@ repos:
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-jsonschema
name: "Validate Release Drafter configuration"
files: ^\.github/release-drafter.yml$
types: [yaml]
args:
[
"--schemafile",
"https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json",
]

0 comments on commit 2df0b74

Please sign in to comment.