diff --git a/.bazelrc b/.bazelrc index dc68efa..0a5672e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,10 +1,3 @@ -# Disable header-only parsing to avoid generating header-only -# compile actions that some tools (like hedron's compile-commands -# extractor) can't handle. This prevents running into errors such -# as "No source files found in compile args" when running -# `bazel run @hedron_compile_commands//:refresh_all`. -build --features=-parse_headers - # Fix for "relocation refers to local symbol in discarded section" build --copt=-fno-asynchronous-unwind-tables build --linkopt=-Wl,--gc-sections diff --git a/.clang-tidy b/.clang-tidy index 55d9bb9..21bac13 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -13,7 +13,7 @@ HeaderFilterRegex: ".*/openfeature/.*" ExcludeHeaderFilterRegex: ".*\\.pb\\.h|.*\\.grpc\\.pb\\.h" # Treat all warnings as errors (optional, good for strict CI/CD) -WarningsAsErrors: "" +WarningsAsErrors: "*" CheckOptions: - key: readability-identifier-naming.ClassCase @@ -74,5 +74,3 @@ CheckOptions: value: 1 - key: readability-braces-around-statements.ShortStatementLines value: 1 - -SystemHeaders: true diff --git a/.github/workflows/ci-format-test-lint.yml b/.github/workflows/ci-format-test-lint.yml index a46ac98..47cfb05 100644 --- a/.github/workflows/ci-format-test-lint.yml +++ b/.github/workflows/ci-format-test-lint.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v6 with: - submodules: 'recursive' + submodules: "recursive" - uses: bazel-contrib/setup-bazel@0.18.0 with: @@ -31,7 +31,7 @@ jobs: steps: - uses: actions/checkout@v6 with: - submodules: 'recursive' + submodules: "recursive" - uses: bazel-contrib/setup-bazel@0.18.0 with: @@ -39,6 +39,9 @@ jobs: disk-cache: ${{ github.workflow }} repository-cache: true + - name: Build all targets + run: bazel build //... + - name: Build compilation database run: bazel run @hedron_compile_commands//:refresh_all @@ -49,6 +52,9 @@ jobs: with: style: "file" # Use .clang-format config file. tidy-checks: "" # Use .clang-tidy config file. + database: "compile_commands.json" + version: "21" + extra-args: "--system-headers" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0