fix: remediate misc-include-cleaner violations (batch 6)#231
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 30 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (23)
📝 WalkthroughWalkthroughThis PR systematically updates bitwise operations across multiple files to use explicit unsigned casting and masking, reorganizes includes for better clarity, makes several constructors explicitly non-convertible, and adjusts the TP segmenter to handle wider offset values (uint32_t instead of uint16_t). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/sd/sd_message.cpp`:
- Around line 398-399: ConfigurationOption::serialize() writes the option length
into data[2]/data[3], but SdOption::deserialize() currently reads length from
data[0]/data[1] and type from data[2], causing mis-parsing; update
SdOption::deserialize to parse the header the same way as
ConfigurationOption::serialize (read the option type from data[0] and read the
16-bit length from data[2] and data[3] using the same endian handling), and
adjust any bounds checks/total-length calculations in SdOption::deserialize to
use those offsets so deserialization matches serialization.
In `@src/someip/message.cpp`:
- Line 34: The NOLINTBEGIN(misc-include-cleaner) suppression started near the
top (the comment with "someip_hton*/someip_ntoh* macros") is never closed; add a
matching "// NOLINTEND(misc-include-cleaner)" annotation immediately before the
closing brace of the namespace someip (the line containing "} // namespace
someip") so the suppression scope is correctly terminated and linting is not
over-suppressed.
In `@src/transport/tcp_transport.cpp`:
- Around line 597-600: Remove the unmatched duplicate
NOLINTEND(misc-include-cleaner) directive near the end of the file so the single
NOLINTBEGIN(misc-include-cleaner) at the top pairs correctly; specifically
delete the second occurrence of "NOLINTEND(misc-include-cleaner)" (the duplicate
that follows the first NOLINTEND) to avoid clang-tidy suppression parsing
failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: df82af09-e58c-4a9b-9890-755b6142644c
📒 Files selected for processing (29)
include/platform/lwip/net_impl.hinclude/platform/posix/net_impl.hinclude/platform/zephyr/net_impl.hinclude/sd/sd_message.hinclude/someip/types.hinclude/tp/tp_segmenter.hsrc/common/result.cppsrc/core/session_manager.cppsrc/e2e/e2e_crc.cppsrc/e2e/e2e_header.cppsrc/e2e/e2e_profile_registry.cppsrc/e2e/e2e_profiles/standard_profile.cppsrc/e2e/e2e_protection.cppsrc/events/event_publisher.cppsrc/events/event_subscriber.cppsrc/rpc/rpc_client.cppsrc/rpc/rpc_server.cppsrc/sd/sd_client.cppsrc/sd/sd_message.cppsrc/sd/sd_server.cppsrc/serialization/serializer.cppsrc/someip/message.cppsrc/someip/types.cppsrc/tp/tp_manager.cppsrc/tp/tp_reassembler.cppsrc/tp/tp_segmenter.cppsrc/transport/endpoint.cppsrc/transport/tcp_transport.cppsrc/transport/udp_transport.cpp
41f582d to
d0cb58b
Compare
Summary
#includedirectives for standard library headers (<cstdint>,<vector>,<string>,<memory>,<optional>,<chrono>,<utility>, etc.) and project headers (someip/types.h,common/result.h,platform/thread.h,sd/sd_types.h,tp/tp_types.h, etc.) across 23 source files.<algorithm>(e2e_crc, e2e_profile_registry, event_subscriber),<unordered_set>(event_publisher),<iostream>(tp_segmenter),serialization/serializer.h(sd_message).platform/byteorder.h→byteorder_impl.h,platform/net.h→net_impl.h,platform/memory.h→memory_impl.h) wheremisc-include-cleanercannot trace macro/type definitions through the indirection. UsesNOLINTNEXTLINEfor include-level suppressions andNOLINTBEGIN/NOLINTENDblocks for files with many platform macro usages (transport, serialization, SD message, E2E).Test plan
Made with Cursor
Summary by CodeRabbit