Skip to content

Fix clang-tidy findings and re-enable on CI - #498

Merged
Neverlord merged 3 commits into
masterfrom
topic/neverlord/reintegrate-clang-tidy
Feb 1, 2026
Merged

Neverlord merged 3 commits into
masterfrom
topic/neverlord/reintegrate-clang-tidy

Conversation

@Neverlord

Copy link
Copy Markdown
Member

Fix remaining clang-tidy findings and re-enable on CI (by fixing the path to the sources in ci/analyze.sh).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses remaining clang-tidy findings and re-enables the CI clang-tidy job by fixing the source path in ci/analyze.sh.

Changes:

  • Update tests and small library code paths to satisfy clang-tidy (e.g., optional checks, tuple utilities, iterator arithmetic).
  • Add/adjust clang-tidy suppressions/configuration and a small API addition (expected::has_value()).
  • Fix CI clang-tidy invocation path; add a Rocky 8 CI Dockerfile.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libbroker/broker/topic.hh Adds targeted NOLINT suppression around topic::compare.
libbroker/broker/status.test.cc Reworks optional/context assertions to avoid dereference and satisfy clang-tidy.
libbroker/broker/peering.test.cc Tweaks macro helper lambda parameter passing to reduce copies / satisfy checks.
libbroker/broker/logger.cc Switches locking primitive to std::scoped_lock.
libbroker/broker/internal/type_id.hh Removes broad NOLINT suppression around an atom-alias macro.
libbroker/broker/internal/channel.test.cc Fixes numeric conversions/iterator arithmetic flagged by clang-tidy.
libbroker/broker/hub.test.cc Updates optional handling in subscriber tests (introduces a logic issue).
libbroker/broker/expected.hh Adds has_value() convenience observer.
libbroker/broker/error.test.cc Reworks optional/context access patterns similarly to other tests.
libbroker/broker/data.test.cc Adds explanation for redundant CHECK(opt) && opt pattern; updates tests accordingly.
libbroker/broker/builder.hh Uses std::tuple_size_v to satisfy modern C++ style checks.
libbroker/broker/alm/routing_table.test.cc Removes unused variable; makes loop variable const-ref.
libbroker/broker/alm/multipath.test.cc Removes unused variable; adds an extra comparison check; makes loop variable const-ref.
libbroker/broker/address.cc Refactors helper into anonymous namespace and simplifies bit math.
ci/rocky-8/Dockerfile Adds new Rocky 8 build image definition.
ci/analyze.sh Updates run-clang-tidy target path to $PWD/libbroker.
.clang-tidy Disables additional checks to reduce findings/noise.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libbroker/broker/hub.test.cc Outdated
Comment thread ci/rocky-8/Dockerfile Outdated
Comment thread ci/rocky-8/Dockerfile Outdated
@Neverlord
Neverlord force-pushed the topic/neverlord/reintegrate-clang-tidy branch from ebc8da4 to ee1acc8 Compare January 25, 2026 16:24
@Neverlord
Neverlord force-pushed the topic/neverlord/reintegrate-clang-tidy branch from 737ee86 to ff9a16d Compare January 25, 2026 18:53
The `performance-unnecessary-value-param` emits tons of warnings,
suggesting to pass iterators as `const&`. This is contrary to the
general guidance to pass small objects such as iterators by value. Since
there are so many false positives, disabling the check altogether makes
more sense than suppressing each one individually.
@Neverlord
Neverlord marked this pull request as ready for review January 25, 2026 21:14
@Neverlord
Neverlord merged commit ccb5476 into master Feb 1, 2026
18 checks passed
@Neverlord
Neverlord deleted the topic/neverlord/reintegrate-clang-tidy branch February 1, 2026 08:07
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.

3 participants