Skip to content

fix: address clang-tidy 17 errors - #1723

Open
isidorowiczdev wants to merge 5 commits into
masterfrom
datasdk-104
Open

fix: address clang-tidy 17 errors#1723
isidorowiczdev wants to merge 5 commits into
masterfrom
datasdk-104

Conversation

@isidorowiczdev

@isidorowiczdev isidorowiczdev commented Aug 21, 2026

Copy link
Copy Markdown

CI enables clang-tidy with -warnings-as-errors, and three checks
were failing the build:

  • clang-analyzer-cplusplus.NewDeleteLeaks (24+ sites across
    TokenEndpointImpl, IndexLayerClientImpl, VolatileLayerClientImpl,
    VersionedLayerClientImpl, StreamLayerClientImpl): Every flagged
    call path was traced end-to-end and contains zero raw new/delete;
    ownership is shared_ptr/std::function throughout, so each site
    is suppressed with NOLINTNEXTLINE

  • clang-analyzer-deadcode.DeadStores (Crypto.cpp:171): ComputeSha256
    mutated value via >>= when packing the last output byte, a
    redundant shift whose result was never read; changed to
    non-mutating >>.

  • clang-analyzer-optin.cplusplus.VirtualCall (SignInResultImpl.cpp:95):
    the constructor called virtual IsValid() instead of reading
    is_valid_ directly

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.39%. Comparing base (6363d4f) to head (7293e54).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1723      +/-   ##
==========================================
+ Coverage   80.34%   80.39%   +0.05%     
==========================================
  Files         356      356              
  Lines       14295    14294       -1     
  Branches     1565     1566       +1     
==========================================
+ Hits        11485    11491       +6     
+ Misses       2178     2174       -4     
+ Partials      632      629       -3     
Files with missing lines Coverage Δ
olp-cpp-sdk-authentication/src/Crypto.cpp 87.85% <100.00%> (ø)
...lp-cpp-sdk-authentication/src/SignInResultImpl.cpp 95.08% <100.00%> (ø)
...p-cpp-sdk-authentication/src/TokenEndpointImpl.cpp 84.09% <ø> (ø)
...sdk-dataservice-write/src/IndexLayerClientImpl.cpp 69.61% <ø> (ø)
...dk-dataservice-write/src/StreamLayerClientImpl.cpp 85.59% <ø> (ø)
...dataservice-write/src/VersionedLayerClientImpl.cpp 39.36% <ø> (ø)
...-dataservice-write/src/VolatileLayerClientImpl.cpp 12.25% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CI enables clang-tidy with -warnings-as-errors, and three checks
were failing the build:

- clang-analyzer-cplusplus.NewDeleteLeaks (24+ sites across
  TokenEndpointImpl, IndexLayerClientImpl, VolatileLayerClientImpl,
  VersionedLayerClientImpl, StreamLayerClientImpl): Every flagged
  call path was traced end-to-end and contains zero raw new/delete;
  ownership is shared_ptr/std::function throughout, so each site
  is suppressed with NOLINTNEXTLINE

- clang-analyzer-deadcode.DeadStores (Crypto.cpp:171): ComputeSha256
  mutated `value` via `>>=` when packing the last output byte, a
  redundant shift whose result was never read; changed to
  non-mutating `>>`.

- clang-analyzer-optin.cplusplus.VirtualCall (SignInResultImpl.cpp:95):
  the constructor called virtual IsValid() instead of reading
  is_valid_ directly

Resolves: DATASDK-104

Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>
@isidorowiczdev
isidorowiczdev force-pushed the datasdk-104 branch 2 times, most recently from c6946dd to 70282cb Compare August 21, 2026 10:41
Add clang-tidy 17 job to the pipeline

Resolves: DATASDK-104

Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>
Chmod fix for clang-tidy script

Resolves: DATASDK-104

Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>
Move each comment directly above the `[=](...)`.

Resolves: DATASDK-104

Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>
Revert formatting

Resolves: DATASDK-104

Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>
"${PWD}/olp-cpp-sdk-core/.*" \
"${PWD}/olp-cpp-sdk-authentication/.*" \
"${PWD}/olp-cpp-sdk-dataservice-read/.*" \
"${PWD}/olp-cpp-sdk-dataservice-write/.*" No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update copyright blocks in changed files
maybe added scripts should have it as well, check other scripts in the reposotory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants