Skip to content

Fix clang-tidy findings in score/time - #330

Draft
MaciejSalwa543 wants to merge 20 commits into
eclipse-score:mainfrom
qorix-group:fix-sca-findings-time-76
Draft

MaciejSalwa543 wants to merge 20 commits into
eclipse-score:mainfrom
qorix-group:fix-sca-findings-time-76

Conversation

@MaciejSalwa543

Copy link
Copy Markdown
Contributor

Description

Depends on #216, which fixes the clang-tidy and sanitizer CI config this relies on. Until #216 is merged the diff here also shows its commits, only the last 11 commits belong to this PR.

Done:

  • concatenated namespaces, missing includes, [[nodiscard]], renamed short identifiers, named magic numbers
  • deleted copy/move in the clock backend interfaces (MISRA C++:2023 Rule 15.0.1), std::forward for the forwarding reference (Rule 28.6.2), no optional::value() in noexcept functions (Rule 18.5.1)
  • 3 NOLINTs with the reason on the same line, plus IgnoreUnnamedParams for the unnamed parameters in the stub
  • ~SvtCallbackDispatcher defaulted, jthread already stops and joins in its destructor
  • same namespace style in the tests, mocks and header-only code

Note: the score/time/ gate only counts what the clang-tidy aspect lints, so header-only targets (clock/, ptp/, mocks) and the QNX-only qtime backend are not covered.

Related ticket

closes #76

Comment thread .clang-tidy
# NOTE: CheckOptions are yet subject to be provided for each enabled check per module.
CheckOptions:
misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: true
cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added for the 3 unnamed && params in the vehicle_time stub (SetTimeSlaveSyncDataReceivedCallback etc.), the stub ignores the callback on purpose. An unnamed param can't be moved anyway, so this can't hide a real missed move. I'd keep it as an option instead of 3 NOLINTs, even though it applies repo-wide

@github-actions

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.8.2) and connecting to it...
INFO: Invocation ID: c1b480f8-2720-46ab-af06-a9e1c3f0eebe
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: /home/runner/.bazel/external/score_baselibs+/score/json/BUILD:24:12: target '@@score_baselibs+//score/json:base_library' is deprecated: base_library no longer has any effect, vaJson is the only parser backend. Remove this flag from your build configuration; it will be deleted in a future release.
Loading: 
Loading: 3 packages loaded
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/time/time/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/time/time/BUILD
INFO: Elapsed time: 16.395s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions

Copy link
Copy Markdown
Contributor

Quality pack traceability report for this pull request:

Status: PASS (workflow run)

Traceability gate input: /home/runner/work/time/time/_build/metrics.json
------------------------------------------------------------------------
[comp_req]
  Requirements with source links: 9/58 (15.52%)
  Requirements with test links:   5/58 (8.62%)
  Requirements fully linked:      5/58 (8.62%)
  Tests linked to requirements:   8/467 (1.71%)
  Broken test references:         0
------------------------------------------------------------------------
Threshold check passed.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-330: https://eclipse-score.github.io/time/pr-330/

This branch was successfully deployed

No deployments
workflow-approval — b0265ecd Deployed Nov 15, 2026 by MaciejSalwa543 via qnx-build (arm64-qnx) / approval #1301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Fix SCA and sanitizer findings: score/time

1 participant