Skip to content

Commit 690386a

Browse files
committed
Fix review comments for clang-tidy PR adoption
1 parent d6ed78f commit 690386a

5 files changed

Lines changed: 3424 additions & 2339 deletions

File tree

.clang-tidy

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# *******************************************************************************
2-
# Copyright (c) 2025 Contributors to the Eclipse Foundation
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
33
#
44
# See the NOTICE file(s) distributed with this work for additional
55
# information regarding copyright ownership.
@@ -12,10 +12,22 @@
1212
# *******************************************************************************
1313

1414
# Clang-tidy configuration for score_logging.
15-
Checks: >
16-
-*, clang-analyzer-*, cert-*, cppcoreguidelines-*, bugprone-*, misc-*, performance-*, readability-*, modernize-* #magic___^_^___line
17-
WarningsAsErrors: >
18-
clang-analyzer-*, #magic___^_^___line
19-
HeaderFilterRegex: '^(?!.*/third_party/).*'
15+
Checks: >-
16+
-*,
17+
clang-analyzer-*,
18+
cert-*,
19+
cppcoreguidelines-*,
20+
bugprone-*,
21+
misc-*,
22+
performance-*,
23+
readability-*,
24+
modernize-*
25+
26+
# NOTE: WarningsAsErrors is yet subject to be expanded per module as compliance increases.
27+
WarningsAsErrors: >-
28+
clang-analyzer-*
29+
30+
# Exclude third-party, generated, and external-repo headers from analysis.
31+
HeaderFilterRegex: '^(?!.*/(third_party|external|bazel-out)/).*$'
2032

2133
FormatStyle: file

.github/workflows/clang_tidy.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,27 @@ on:
1818
types: [opened, reopened, synchronize]
1919
merge_group:
2020

21+
permissions:
22+
contents: read
23+
24+
concurrency:
25+
group: clang-tidy-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
26+
cancel-in-progress: true
27+
2128
jobs:
2229
clang-tidy:
2330
runs-on: ubuntu-latest
31+
timeout-minutes: 30
2432
steps:
2533
- uses: actions/checkout@v4
2634
- name: Setup Bazel
2735
uses: bazel-contrib/setup-bazel@0.15.0
2836
with:
2937
bazelisk-version: 1.26.0
38+
disk-cache: clang-tidy
39+
repository-cache: true
40+
external-cache: true
3041
- name: Run clang-tidy
42+
# Scope limited to //score/mw/... because Rust/QNX targets are not yet
43+
# validated against this configuration. Expand once they pass.
3144
run: bazel test --config=clang-tidy --lockfile_mode=error //score/mw/...

MODULE.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ bazel_dep(name = "rules_python", version = "1.4.1")
2121
bazel_dep(name = "bazel_skylib", version = "1.7.1")
2222
bazel_dep(name = "rules_rust", version = "0.68.1-score")
2323
bazel_dep(name = "rules_cc", version = "0.1.1")
24-
bazel_dep(name = "aspect_rules_lint", version = "1.0.3")
24+
bazel_dep(name = "aspect_rules_lint", version = "2.5.0")
2525

2626
bazel_dep(name = "score_cpp_policies", version = "0.0.0", dev_dependency = True)
2727
git_override(
2828
module_name = "score_cpp_policies",
29-
commit = "87b5b33dea15ff2e2dde1b0aae9cb982f49bc277",
29+
# TODO: replace with merged commit on eclipse-score/score_cpp_policies once PR #2 lands.
30+
commit = "f147fc8",
3031
remote = "https://github.com/RSingh1511/score_cpp_policies.git",
3132
)
3233

0 commit comments

Comments
 (0)