Skip to content

Commit 2df0b74

Browse files
authored
🚸 improve cpp-linter configuration (#1)
* 🚸 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
1 parent a563bbd commit 2df0b74

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.github/workflows/reusable-cpp-linter.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
description: "Clang version to use"
77
default: 18
88
type: number
9+
files-changed-only:
10+
description: "Whether to only lint files that have changed"
11+
default: true
12+
type: boolean
913
cmake-args:
1014
description: "Additional arguments to pass to CMake"
1115
default: ""
@@ -71,11 +75,11 @@ jobs:
7175
tidy-checks: ""
7276
version: ${{ env.clang-version }}
7377
ignore: "build|include/python|src/python"
74-
thread-comments: ${{ github.event_name == 'pull_request' }}
78+
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
7579
step-summary: true
7680
database: "build"
7781
extra-args: -std=c++17
78-
files-changed-only: true
82+
files-changed-only: ${{ inputs.files-changed-only }}
7983
- name: Fail if linter found errors
8084
if: steps.linter.outputs.checks-failed > 0
8185
run: echo "Linter found errors" && exit 1

.pre-commit-config.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,3 @@ repos:
6464
hooks:
6565
- id: check-dependabot
6666
- id: check-github-workflows
67-
- id: check-jsonschema
68-
name: "Validate Release Drafter configuration"
69-
files: ^\.github/release-drafter.yml$
70-
types: [yaml]
71-
args:
72-
[
73-
"--schemafile",
74-
"https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json",
75-
]

0 commit comments

Comments
 (0)