From 82cbd1b985b0ffa7289d67336324f4e9c5275ace Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 15:43:34 +0000 Subject: [PATCH 01/18] Testing clang_tidy error style check Signed-off-by: Marcin Olko --- .bazelrc | 7 ------- .clang-tidy | 2 +- openfeature/evaluation_context.h | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) 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..cbdebd2 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 diff --git a/openfeature/evaluation_context.h b/openfeature/evaluation_context.h index 51c876f..76f45aa 100644 --- a/openfeature/evaluation_context.h +++ b/openfeature/evaluation_context.h @@ -60,4 +60,4 @@ class EvaluationContext::Builder { } // namespace openfeature -#endif // CPP_SDK_INCLUDE_OPENFEATURE_EVALUATION_CONTEXT_H_ +#endif // CPP_SDK_INCLUDE_OPENFEATURE_EVALUATION_CONTEXT_H_ \ No newline at end of file From 7c41dfb3051d0536a4c0c860a218de83db33f959 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 15:56:07 +0000 Subject: [PATCH 02/18] Add building targets Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index bb372fc..45bd9e6 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -33,6 +33,9 @@ jobs: # Share repository cache between workflows. repository-cache: true + - name: Build all targets + run: bazel build //... + - name: Build compilation database run: bazel run @hedron_compile_commands//:refresh_all From 9d8fef6c5667fc9a03d9d4d896211bde413917ee Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:03:22 +0000 Subject: [PATCH 03/18] Adding debug check Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index 45bd9e6..2fb9557 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -39,6 +39,13 @@ jobs: - name: Build compilation database run: bazel run @hedron_compile_commands//:refresh_all + - name: Debug DB + run: | + echo "Current Dir: $(pwd)" + ls -lh compile_commands.json + # Check if the file with errors is actually in the DB + grep "client_api.cpp" compile_commands.json | head -n 1 || echo "FILE NOT IN DB" + - uses: cpp-linter/cpp-linter-action@v2 id: linter env: From 807dda1b7a7578a84d3672d2b4671bd12a566148 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:10:38 +0000 Subject: [PATCH 04/18] Adding more debug checks Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index 2fb9557..6e00a6a 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -23,6 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + with: + fetch-depth: 0 - uses: bazel-contrib/setup-bazel@0.18.0 with: @@ -57,3 +59,15 @@ jobs: - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 run: exit 1 + + - name: ☢️ NUCLEAR DEBUG - Manual Clang-Tidy Run + run: | + echo "=== 1. Checking Database Entry ===" + # Check how the file is referenced in the DB (Absolute vs Relative paths) + grep "openfeature/evaluation_context.h" compile_commands.json | head -n 1 + + echo "=== 2. Running Clang-Tidy Manually ===" + # We manually invoke clang-tidy on a file we KNOW has errors. + # We explicitly point to the config and the build folder. + + clang-tidy -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" From 5beab78f17206f09a9d7bb23736cf83abd11f053 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:18:02 +0000 Subject: [PATCH 05/18] Updating clang-tidy version Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index 6e00a6a..a624640 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -55,6 +55,8 @@ jobs: with: style: "file" # Use .clang-format config file. tidy-checks: "" # Use .clang-tidy config file. + database: "compile_commands.json" + version: "16" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 From 131eec97516aee78a3b4c4ad86b7ce7fa384c5f3 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:24:09 +0000 Subject: [PATCH 06/18] More debugging Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index a624640..d17c407 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -73,3 +73,6 @@ jobs: # We explicitly point to the config and the build folder. clang-tidy -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" + + echo "=== 3. Running Clang-Tidy 16 Manually ===" + /usr/bin/clang-tidy-16 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" From fd7721a62a22449653a30064999b53dd24a0f8b6 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:31:41 +0000 Subject: [PATCH 07/18] Removed systemheaders field Signed-off-by: Marcin Olko --- .clang-tidy | 2 -- 1 file changed, 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index cbdebd2..21bac13 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -74,5 +74,3 @@ CheckOptions: value: 1 - key: readability-braces-around-statements.ShortStatementLines value: 1 - -SystemHeaders: true From cb45ddb0d0264423f7f373287b2e54af8091b225 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:38:06 +0000 Subject: [PATCH 08/18] More tests Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index d17c407..5283529 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -56,7 +56,7 @@ jobs: style: "file" # Use .clang-format config file. tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" - version: "16" + version: "23" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 @@ -75,4 +75,4 @@ jobs: clang-tidy -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" echo "=== 3. Running Clang-Tidy 16 Manually ===" - /usr/bin/clang-tidy-16 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" + /usr/bin/clang-tidy-23 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" From e0f155f20764f1deff19f7ed38e10110fe52736c Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Feb 2026 16:44:21 +0000 Subject: [PATCH 09/18] More tests Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index 5283529..f617bb5 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -56,7 +56,7 @@ jobs: style: "file" # Use .clang-format config file. tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" - version: "23" + version: "20" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 @@ -75,4 +75,4 @@ jobs: clang-tidy -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" echo "=== 3. Running Clang-Tidy 16 Manually ===" - /usr/bin/clang-tidy-23 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" + /usr/bin/clang-tidy-20 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" From d87c477a6a35c6ecd770859187ac4f25a9760285 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Feb 2026 11:07:52 +0000 Subject: [PATCH 10/18] Checking if lines matter Signed-off-by: Marcin Olko --- openfeature/evaluation_context.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openfeature/evaluation_context.h b/openfeature/evaluation_context.h index 76f45aa..49450e3 100644 --- a/openfeature/evaluation_context.h +++ b/openfeature/evaluation_context.h @@ -53,6 +53,8 @@ class EvaluationContext::Builder { // The build() method creates the final, immutable EvaluationContext object. EvaluationContext build() const; + int Testing; + private: std::optional targeting_key_; std::map attributes_; From 8606215fda15ad0ac5d44cc806bddff5cc44fe19 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Feb 2026 11:16:44 +0000 Subject: [PATCH 11/18] Adding system Headers to check Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index f617bb5..be75525 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -57,6 +57,7 @@ jobs: tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" version: "20" + extra-args: "--system-headers" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 From ed0ed96422b28d70226ae92fee3e48b4903c1005 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Feb 2026 11:27:02 +0000 Subject: [PATCH 12/18] Added non header file Signed-off-by: Marcin Olko --- openfeature/evaluation_context.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/openfeature/evaluation_context.cpp b/openfeature/evaluation_context.cpp index 741aea0..85ee476 100644 --- a/openfeature/evaluation_context.cpp +++ b/openfeature/evaluation_context.cpp @@ -73,6 +73,7 @@ EvaluationContext::Builder& EvaluationContext::Builder::WithAttribute( EvaluationContext::Builder& EvaluationContext::Builder::WithAttribute( std::string key, const char* value) { + Testing += 1; return this->WithAttribute(std::move(key), std::string(value)); } From bc7e9cb60da8baa5f9e0e8735b1b1a33cdb02faf Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Feb 2026 11:46:32 +0000 Subject: [PATCH 13/18] Trying to resolve symlinks Signed-off-by: Marcin Olko --- .github/workflows/clang-format-and-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-format-and-lint.yml b/.github/workflows/clang-format-and-lint.yml index be75525..4c2f768 100644 --- a/.github/workflows/clang-format-and-lint.yml +++ b/.github/workflows/clang-format-and-lint.yml @@ -57,7 +57,7 @@ jobs: tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" version: "20" - extra-args: "--system-headers" + extra-args: "--system-headers -fdiagnostics-absolute-paths" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 From ee708246e0ec8010f67949d7aa144f38b291d20d Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 10 Feb 2026 15:15:14 +0000 Subject: [PATCH 14/18] Trying to enable System headers checks Signed-off-by: Marcin Olko --- .clang-tidy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 21bac13..cbdebd2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -74,3 +74,5 @@ CheckOptions: value: 1 - key: readability-braces-around-statements.ShortStatementLines value: 1 + +SystemHeaders: true From 20ebc74d2bd3a04c34394a7fda9f07efd3fc8512 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Mon, 2 Mar 2026 11:42:46 +0000 Subject: [PATCH 15/18] Bumped clang-tidy version Signed-off-by: Marcin Olko --- .github/workflows/ci-format-test-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-format-test-lint.yml b/.github/workflows/ci-format-test-lint.yml index 7d567f4..a136383 100644 --- a/.github/workflows/ci-format-test-lint.yml +++ b/.github/workflows/ci-format-test-lint.yml @@ -60,7 +60,7 @@ jobs: style: "file" # Use .clang-format config file. tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" - version: "20" + version: "21" extra-args: "--system-headers -fdiagnostics-absolute-paths" - name: Fail fast?! From 7fb0610601b27fdfc4548442acacc88ebc8b89e3 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Mar 2026 12:37:44 +0000 Subject: [PATCH 16/18] Remove unused check steps Signed-off-by: Marcin Olko --- .github/workflows/ci-format-test-lint.yml | 24 +---------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/ci-format-test-lint.yml b/.github/workflows/ci-format-test-lint.yml index a136383..47cfb05 100644 --- a/.github/workflows/ci-format-test-lint.yml +++ b/.github/workflows/ci-format-test-lint.yml @@ -45,13 +45,6 @@ jobs: - name: Build compilation database run: bazel run @hedron_compile_commands//:refresh_all - - name: Debug DB - run: | - echo "Current Dir: $(pwd)" - ls -lh compile_commands.json - # Check if the file with errors is actually in the DB - grep "client_api.cpp" compile_commands.json | head -n 1 || echo "FILE NOT IN DB" - - uses: cpp-linter/cpp-linter-action@v2 id: linter env: @@ -61,23 +54,8 @@ jobs: tidy-checks: "" # Use .clang-tidy config file. database: "compile_commands.json" version: "21" - extra-args: "--system-headers -fdiagnostics-absolute-paths" + extra-args: "--system-headers" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0 run: exit 1 - - - name: ☢️ NUCLEAR DEBUG - Manual Clang-Tidy Run - run: | - echo "=== 1. Checking Database Entry ===" - # Check how the file is referenced in the DB (Absolute vs Relative paths) - grep "openfeature/evaluation_context.h" compile_commands.json | head -n 1 - - echo "=== 2. Running Clang-Tidy Manually ===" - # We manually invoke clang-tidy on a file we KNOW has errors. - # We explicitly point to the config and the build folder. - - clang-tidy -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" - - echo "=== 3. Running Clang-Tidy 16 Manually ===" - /usr/bin/clang-tidy-20 -p . openfeature/evaluation_context.h --config-file=.clang-tidy || echo "Manual Run Failed as Expected" From 1c5683f105c6ebcb560263af50a316018b98e297 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Mar 2026 13:29:44 +0000 Subject: [PATCH 17/18] Reverted snippets for linter error Signed-off-by: Marcin Olko --- openfeature/evaluation_context.cpp | 1 - openfeature/evaluation_context.h | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/openfeature/evaluation_context.cpp b/openfeature/evaluation_context.cpp index 85ee476..741aea0 100644 --- a/openfeature/evaluation_context.cpp +++ b/openfeature/evaluation_context.cpp @@ -73,7 +73,6 @@ EvaluationContext::Builder& EvaluationContext::Builder::WithAttribute( EvaluationContext::Builder& EvaluationContext::Builder::WithAttribute( std::string key, const char* value) { - Testing += 1; return this->WithAttribute(std::move(key), std::string(value)); } diff --git a/openfeature/evaluation_context.h b/openfeature/evaluation_context.h index 49450e3..51c876f 100644 --- a/openfeature/evaluation_context.h +++ b/openfeature/evaluation_context.h @@ -53,8 +53,6 @@ class EvaluationContext::Builder { // The build() method creates the final, immutable EvaluationContext object. EvaluationContext build() const; - int Testing; - private: std::optional targeting_key_; std::map attributes_; @@ -62,4 +60,4 @@ class EvaluationContext::Builder { } // namespace openfeature -#endif // CPP_SDK_INCLUDE_OPENFEATURE_EVALUATION_CONTEXT_H_ \ No newline at end of file +#endif // CPP_SDK_INCLUDE_OPENFEATURE_EVALUATION_CONTEXT_H_ From 8e91b198f3094966e8d41f187bcae22ccff10030 Mon Sep 17 00:00:00 2001 From: Marcin Olko Date: Tue, 3 Mar 2026 16:38:48 +0000 Subject: [PATCH 18/18] Removed incorrect flag Signed-off-by: Marcin Olko --- .clang-tidy | 2 -- 1 file changed, 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index cbdebd2..21bac13 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -74,5 +74,3 @@ CheckOptions: value: 1 - key: readability-braces-around-statements.ShortStatementLines value: 1 - -SystemHeaders: true