Skip to content

Commit 5eaa78f

Browse files
authored
ci(lint): Fix clang_tidy linter check (#60)
Signed-off-by: Marcin Olko <molko@google.com>
1 parent f47ee58 commit 5eaa78f

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

.bazelrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# Disable header-only parsing to avoid generating header-only
2-
# compile actions that some tools (like hedron's compile-commands
3-
# extractor) can't handle. This prevents running into errors such
4-
# as "No source files found in compile args" when running
5-
# `bazel run @hedron_compile_commands//:refresh_all`.
6-
build --features=-parse_headers
7-
81
# Fix for "relocation refers to local symbol in discarded section"
92
build --copt=-fno-asynchronous-unwind-tables
103
build --linkopt=-Wl,--gc-sections

.clang-tidy

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ HeaderFilterRegex: ".*/openfeature/.*"
1313
ExcludeHeaderFilterRegex: ".*\\.pb\\.h|.*\\.grpc\\.pb\\.h"
1414

1515
# Treat all warnings as errors (optional, good for strict CI/CD)
16-
WarningsAsErrors: ""
16+
WarningsAsErrors: "*"
1717

1818
CheckOptions:
1919
- key: readability-identifier-naming.ClassCase
@@ -74,5 +74,3 @@ CheckOptions:
7474
value: 1
7575
- key: readability-braces-around-statements.ShortStatementLines
7676
value: 1
77-
78-
SystemHeaders: true

.github/workflows/ci-format-test-lint.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v6
1414
with:
15-
submodules: 'recursive'
15+
submodules: "recursive"
1616

1717
- uses: bazel-contrib/setup-bazel@0.18.0
1818
with:
@@ -31,14 +31,17 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@v6
3333
with:
34-
submodules: 'recursive'
34+
submodules: "recursive"
3535

3636
- uses: bazel-contrib/setup-bazel@0.18.0
3737
with:
3838
bazelisk-cache: true
3939
disk-cache: ${{ github.workflow }}
4040
repository-cache: true
4141

42+
- name: Build all targets
43+
run: bazel build //...
44+
4245
- name: Build compilation database
4346
run: bazel run @hedron_compile_commands//:refresh_all
4447

@@ -49,6 +52,9 @@ jobs:
4952
with:
5053
style: "file" # Use .clang-format config file.
5154
tidy-checks: "" # Use .clang-tidy config file.
55+
database: "compile_commands.json"
56+
version: "21"
57+
extra-args: "--system-headers"
5258

5359
- name: Fail fast?!
5460
if: steps.linter.outputs.checks-failed > 0

0 commit comments

Comments
 (0)