Skip to content

fix: address clang-tidy 17 errors - #1723

Merged
isidorowiczdev merged 6 commits into
masterfrom
datasdk-104
Aug 25, 2026
Merged

fix: address clang-tidy 17 errors#1723
isidorowiczdev merged 6 commits into
masterfrom
datasdk-104

Conversation

@isidorowiczdev

@isidorowiczdevisidorowiczdev commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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
Co-Author: Yaroslav Stefinko ext-yaroslav.stefinko@here.com

@codecov

codecovBot 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 (6cb994d).

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 linesCoverage Δ
olp-cpp-sdk-authentication/src/Crypto.cpp87.85% <100.00%> (ø)
...lp-cpp-sdk-authentication/src/SignInResultImpl.cpp95.08% <100.00%> (ø)
...p-cpp-sdk-authentication/src/TokenEndpointImpl.cpp84.09% <ø> (ø)
...sdk-dataservice-write/src/IndexLayerClientImpl.cpp69.61% <ø> (ø)
...dk-dataservice-write/src/StreamLayerClientImpl.cpp85.59% <ø> (ø)
...dataservice-write/src/VersionedLayerClientImpl.cpp39.36% <ø> (ø)
...-dataservice-write/src/VolatileLayerClientImpl.cpp12.25% <ø> (ø)

... and 3 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
isidorowiczdevforce-pushed the datasdk-104 branch 2 times, most recently from c6946dd to 70282cbCompareAugust 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>
Comment threadscripts/misc/clang-tidy-17-check.sh
Add copyrights to the changed files.
Resolves: DATASDK-104
Signed-off-by: Iwo Sidorowicz <iwo.sidorowicz@here.com>

@rustam-gamidov-hererustam-gamidov-here left a comment

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.

No issues found, Except that i would simplify MR title a bit as 'fix' and 'address' looks pretty similar and to follow previous MRs style

@isidorowiczdev
isidorowiczdev merged commit 403d2bd into masterAug 25, 2026
49 of 51 checks passed
@isidorowiczdev
isidorowiczdev deleted the datasdk-104 branch August 25, 2026 13:12
@ystefinkoystefinko mentioned this pull request Aug 26, 2026
Sign up for freeto 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.

3 participants

@isidorowiczdev@ystefinko@rustam-gamidov-here