Skip to content

refactor: S10.22 enum naming convention restoration (SCREAMING_SNAKE)#391

Merged
DavidCozens merged 9 commits into
mainfrom
refactor/s10-22-enum-naming-restoration
May 17, 2026
Merged

refactor: S10.22 enum naming convention restoration (SCREAMING_SNAKE)#391
DavidCozens merged 9 commits into
mainfrom
refactor/s10-22-enum-naming-restoration

Conversation

@DavidCozens

@DavidCozens DavidCozens commented May 17, 2026

Copy link
Copy Markdown
Owner

Purpose

Restore a single, mechanically enforceable rule for enum constant naming. The S10.07-introduced SolidSyslog<Class>_<Member> convention and the S10.12 SCREAMING_SNAKE carve-out for the anonymous-enum named-constant idiom together formed a two-class system that's not enforceable by clang-tidy — only per-site judgement separates the cases. By the S10.16 review the boundary was drifting (a third hybrid form Class_DEFAULT_INSTANCE was about to be introduced). Collapse to one rule.

Closes #390.

Change Description

Single rule, mechanically enforced: all enum constants are SCREAMING_SNAKE. Tagged or anonymous, public or TU-local.

  • Word boundaries: snake-separate at every CamelCase boundary in the source identifier (DatagramSendResultDATAGRAM_SEND_RESULT, AuthPrivAUTH_PRIV). Trailing digits stay glued (Local0LOCAL0, matching POSIX LOG_LOCAL0).
  • Project prefix: SOLIDSYSLOG_ on public sites; bare SCREAMING on TU-local anonymous-enum constants (IPV4_HEADER_BYTES).
  • .clang-tidy EnumConstantCaseUPPER_CASE only; dropped EnumConstantPrefix + EnumConstantIgnoredRegexp.
  • NAMING.md "Enum constants" section replaces the old two-section split. Quick-ref table updated.

Sweep in 8 commits, build green between each:

  1. SolidSyslogFacility_*SOLIDSYSLOG_FACILITY_* (24 constants)
  2. SolidSyslogSeverity_*SOLIDSYSLOG_SEVERITY_* (8)
  3. SolidSyslogDiscardPolicy_*SOLIDSYSLOG_DISCARD_POLICY_* (3)
  4. SolidSyslogDatagramSendResult_*SOLIDSYSLOG_DATAGRAM_SEND_RESULT_* (3)
  5. SolidSyslogTransport_*SOLIDSYSLOG_TRANSPORT_* (2)
  6. Glued storage-SIZE macros → snake (11: CIRCULARBUFFERCIRCULAR_BUFFER, STDATOMICCOUNTERSTD_ATOMIC_COUNTER, etc.) — pre-existing class-segment-glued macros didn't match the rule we were adopting; second pass aligns them.
  7. .clang-tidy + NAMING.md single-rule update.
  8. clang-format follow-up (2 files needed reformat after the rename).

Static-variable naming (the instance / DEFAULT_INSTANCE family) is explicitly out of scope — those are objects, not enum constants. The per-group conformance stories (S10.16 onwards) will hit them on touch.

Test Evidence

  • 1115 tests pass under debug + clang-debug + sanitize presets (verified after every sweep commit).
  • Coverage 99.6% lines / 99.0% functions — unchanged.
  • analyze-tidy clean — zero enum-case warnings under the new UPPER_CASE rule.
  • analyze-cppcheck + cppcheck-misra histograms match main exactly (87 unsuppressed findings across 8 rules, identical counts) — zero regression introduced by the sweep.
  • clang-format dry-run clean across all C/C++ sources.

No new tests — pure rename + tooling sweep. Existing test suite covers the renamed constants by reference.

Areas Affected

  • Core/Interface/ — public enum headers (SolidSyslogPrival.h, SolidSyslogDatagram.h, SolidSyslogBlockStore.h, SolidSyslogTransport.h, storage SIZE macros across the public surface).
  • Core/Source/, Platform/*/, Tests/, Bdd/, docs/ — every call site of the renamed constants.
  • .clang-tidy — single rule for enum constants.
  • docs/NAMING.md — section rewrite + quick-ref table.

S10.16 (Senders conformance, #389) resumes on top of this.

Summary by CodeRabbit

  • Style

    • Standardized enum constant naming conventions throughout the codebase for improved consistency and readability.
  • Documentation

    • Updated documentation to reflect the new naming conventions for public API constants.
  • Chores

    • Refactored internal constants and macros to follow uniform naming standards; functionality remains unchanged. Applications using public API constants will need to update their references.

Review Change Stack

DavidCozens and others added 9 commits May 17, 2026 12:00
Phase 1 of the enum naming convention restoration: convert the 24
SolidSyslogFacility enum constants from project-prefix-PascalCase
(SolidSyslogFacility_Kern) to SCREAMING_SNAKE
(SOLIDSYSLOG_FACILITY_KERN). Compound member names get snake-separated
at CamelCase boundaries: AuthPriv → AUTH_PRIV. Trailing digits stay
glued: Local0 → LOCAL0.

The enum type itself (struct/enum tag SolidSyslogFacility) is unchanged
— only its constants are renamed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 2 of the enum naming convention restoration: convert the 8
SolidSyslogSeverity enum constants from project-prefix-PascalCase to
SCREAMING_SNAKE. No compound member names — straightforward rename.

The enum type itself (SolidSyslogSeverity) is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ICY_*

Phase 3: 3 constants — Oldest, Newest, Halt. DiscardPolicy is two
words, so the type prefix becomes DISCARD_POLICY.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…AM_SEND_RESULT_*

Phase 4: 3 constants — Sent, Failed, Oversize. DatagramSendResult is
three words, so the type prefix becomes DATAGRAM_SEND_RESULT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 5: 2 constants — Udp, Tcp. Final tagged-enum rename in this
sweep; the type prefix becomes TRANSPORT_UDP / TRANSPORT_TCP.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves the project-wide inconsistency where multi-word class names
inside SCREAMING macros were glued (SOLIDSYSLOG_CIRCULARBUFFER_*) while
others used snake separation (SOLIDSYSLOG_STREAM_SENDER_SIZE,
SOLIDSYSLOG_WINSOCK_TCP_STREAM_SIZE). Aligns every multi-word class
segment with the snake-at-every-CamelCase-boundary rule established for
S10.22 enum constants.

Renames (11):
  BLOCKSTORE      → BLOCK_STORE
  CIRCULARBUFFER  → CIRCULAR_BUFFER  (4 sub-names)
  FILEBLOCKDEVICE → FILE_BLOCK_DEVICE
  FREERTOSDATAGRAM/MUTEX/STATICRESOLVER/TCPSTREAM → FREE_RTOS_* (4)
  POSIXMUTEX      → POSIX_MUTEX
  STDATOMICCOUNTER → STD_ATOMIC_COUNTER
  WINDOWSATOMICCOUNTER → WINDOWS_ATOMIC_COUNTER
  WINDOWSMUTEX    → WINDOWS_MUTEX

Single-word class segments (SOLIDSYSLOG_FORMATTER_STORAGE_SIZE,
SOLIDSYSLOG_ADDRESS_SIZE, SOLIDSYSLOG_WINDOWS_FILE_SIZE,
SOLIDSYSLOG_WINSOCK_TCP_STREAM_SIZE, etc.) are unchanged — already in
the right shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Collapses the two-rule enum-constant convention introduced by S10.07 +
S10.12 into a single mechanically-enforceable rule:

- All enum constants → SCREAMING_SNAKE. No exceptions for tagged vs
  anonymous, public vs TU-local.
- Snake-separate at every CamelCase boundary in the source identifier;
  trailing digits stay glued (Local0 → LOCAL0).
- Public sites carry the SOLIDSYSLOG_ prefix (enforced by review +
  cppcheck-misra 5.4, since clang-tidy can't distinguish public from
  TU-local enum constants).

.clang-tidy: EnumConstantCase → UPPER_CASE only; dropped the
EnumConstantPrefix + EnumConstantIgnoredRegexp escape. One rule, no
exceptions.

NAMING.md: replaced the "Anonymous-enum named-constant idiom"
carve-out with a single "Enum constants" section. Quick-reference
table updated. Historical S10.07/S10.12 split documented as
superseded.

The previous two-rule system relied on per-site judgement to decide
whether a constant was "macro-like enough" to warrant SCREAMING vs
class-scoped PascalCase. That judgement was drifting; S10.16 surfaced
a third hybrid form (Class_DEFAULT_INSTANCE) that nobody had decided
on. One rule, one tidy setting, no IgnoredRegexp escape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two files needed reformat after the enum rename: backslash-continuation
column alignment in a CHECK_REPORTED_ERROR macro shifted because the
content shifted (Tests/Support/ErrorHandlerFake.h), and one test-fixture
initialiser exceeded the column limit and reflowed
(Tests/SolidSyslogBlockStoreDrainOrderingTest.cpp).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR implements the S10.22 enum constant naming convention restoration by renaming all enum constants from mixed-case PascalCase (e.g., SolidSyslogSeverity_Error) to SCREAMING_SNAKE with project prefix (e.g., SOLIDSYSLOG_SEVERITY_ERROR) across interface headers, core implementations, platform-specific code, BDD targets, test suite, and tooling/documentation.

Changes

Enum constant naming restoration (S10.22)

Layer / File(s) Summary
Public enum constant definitions and storage-sizing macros
Core/Interface/SolidSyslogPrival.h, Core/Interface/SolidSyslogTransport.h, Core/Interface/SolidSyslogDatagram.h, Core/Interface/SolidSyslogBlockStore.h, Core/Interface/SolidSyslogCircularBuffer.h, Core/Interface/SolidSyslogFileBlockDevice.h, Platform/*/Interface/SolidSyslog*[A-Z].h
Facility, Severity, Transport, DatagramSendResult, and DiscardPolicy enum members renamed from SolidSyslogClass_Member to SOLIDSYSLOG_CLASS_MEMBER; storage-sizing constants renamed to use underscores in compound names (e.g., SOLIDSYSLOG_BLOCK_STORE_STORAGE_SIZE, SOLIDSYSLOG_CIRCULAR_BUFFER_STORAGE_SIZE).
Core implementation enum constant usage
Core/Source/SolidSyslog.c, Core/Source/BlockSequence.c, Core/Source/SolidSyslogMetaSd.c, Core/Source/SolidSyslogCircularBuffer.c, Core/Source/SolidSyslogBlockStore.c, Core/Source/SolidSyslogFileBlockDevice.c
Error reporting and prival initialization now use SOLIDSYSLOG_SEVERITY_* and SOLIDSYSLOG_FACILITY_* constants; discard-policy comparisons use SOLIDSYSLOG_DISCARD_POLICY_*; storage-sizing assertions reference renamed macros.
Platform transport/datagram/resolver implementations
Platform/Posix/Source/SolidSyslogGetAddrInfoResolver.c, Platform/Posix/Source/SolidSyslogPosixDatagram.c, Platform/Posix/Source/SolidSyslogUdpSender.c, Platform/Windows/Source/SolidSyslogWinsockResolver.c, Platform/Windows/Source/SolidSyslogWinsockDatagram.c, Platform/FreeRtos/Source/SolidSyslog*Datagram.c
Transport selection and datagram send-result handling updated to use SOLIDSYSLOG_TRANSPORT_* and SOLIDSYSLOG_DATAGRAM_SEND_RESULT_* constants; severity reporting uses SOLIDSYSLOG_SEVERITY_*.
BDD target implementations
Bdd/Targets/FreeRtos/main.c, Bdd/Targets/Linux/BddTargetCommandLine.c, Bdd/Targets/Linux/main.c, Bdd/Targets/Windows/BddTargetWindows.c, Bdd/Targets/Windows/BddTargetWindowsCommandLine.c
Test message initialization, command-line default parsing, and discard-policy mapping functions updated to use SOLIDSYSLOG_* enum constants and renamed circular-buffer sizing macros.
Test support infrastructure and fakes
Tests/DatagramFake.c, Tests/DatagramFake.h, Tests/Support/ErrorHandlerFake.c, Tests/Support/ErrorHandlerFake.h
Fake implementations and test helper macros updated to initialize and assert with SOLIDSYSLOG_SEVERITY_*, SOLIDSYSLOG_DATAGRAM_SEND_RESULT_*, and SOLIDSYSLOG_TRANSPORT_* constants.
Test case assertions and configurations
Tests/BlockSequenceTest.cpp, Tests/Bdd/Targets/*.cpp, Tests/SolidSyslogBlockStore*.cpp, Tests/SolidSyslogCircularBuffer*.cpp, Tests/SolidSyslogDatagramFake*.cpp, Tests/SolidSyslog*.cpp, Tests/FreeRtos/*.cpp, Tests/SolidSyslogPrivalTest.cpp, Tests/Support/ErrorHandlerFake.h
Message initializations, discard-policy configurations, transport selections, and send-result assertions updated to use new SOLIDSYSLOG_* constant names; storage-sizing macros updated to include underscores in compound names.
Tooling configuration and documentation
.clang-tidy, docs/NAMING.md, docs/misra-conformance.md, docs/misra-deviations.md, DEVLOG.md
.clang-tidy EnumConstantCase set to UPPER_CASE with IgnoredRegexp removed; NAMING.md collapses to single SCREAMING_SNAKE rule for all enums; MISRA docs updated with new macro/constant names; DEVLOG.md entry documents S10.22 decision, scope, and verification results.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #390: S10.22: Enum naming convention restoration (SCREAMING_SNAKE) — This PR directly implements the decisions and scope outlined in issue #390, renaming all enum constants from mixed-case to SCREAMING_SNAKE with project prefix and updating the tooling to enforce the single rule.

Possibly related PRs

Poem

🐰 Constants now scream in SNAKE case so fine,
No more mixed styles—the naming's aligned.
From Facility_Local0 to FACILITY_LOCAL0,
One single rule makes the linters all glow. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: restoration of a single enum naming convention (SCREAMING_SNAKE) and reference to the relevant issue (#390). It follows conventional commit format with 'refactor:' prefix.
Description check ✅ Passed The description is comprehensive and covers all key sections: purpose (replacing two-class system with single rule), change description (mechanical sweep with detailed examples), test evidence (extensive verification across multiple presets and tools), and areas affected (thorough listing of touched components).
Linked Issues check ✅ Passed All coding requirements from issue #390 are met: enum constants renamed to SCREAMING_SNAKE across all identified enums, storage macros normalized with snake separation, .clang-tidy simplified to single UPPER_CASE rule without IgnoredRegexp, NAMING.md rewritten to single rule, comprehensive test coverage (1115 tests), zero regressions (cppcheck histograms match).
Out of Scope Changes check ✅ Passed All changes are in scope: mechanical renaming of enum constants as per #390, storage-size macro normalization, tooling updates (.clang-tidy, NAMING.md), and call-site updates. Static variable naming (instance, DEFAULT_INSTANCE) is explicitly noted as out-of-scope and left unchanged.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/s10-22-enum-naming-restoration

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/misra-conformance.md (1)

87-87: ⚡ Quick win

Update stale enum-constant wording to match S10.22.

Line 87 still references the older SolidSyslogClass_Constant framing and an unresolved anonymous-enum split, which now conflicts with the single SCREAMING_SNAKE convention adopted in this PR. A small wording update here would prevent policy drift across docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/misra-conformance.md` at line 87, Update the enum-constant wording at
the cited paragraph to reflect S10.22's single SCREAMING_SNAKE convention
instead of the older SolidSyslogClass_Constant framing: remove the reference to
the unresolved anonymous-enum split and state that constants like
SOLIDSYSLOG_SEVERITY_EMERGENCY and SOLIDSYSLOG_ADDRESS_SIZE follow
SCREAMING_SNAKE; note the two remediation options (treat anonymous-enum entries
as macro-equivalents and tighten the .clang-tidy regex, or rename them to a
class-prefixed PascalCase form) so the docs match the repo decision taken in
this PR.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Tests/DatagramFake.h`:
- Line 19: Update the inaccurate header comment that currently states calls
beyond configured slots return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_SENT; change it
to correctly state they return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED to match
the behavior implemented in SendTo and the related test logic (reference
symbols: DatagramFake, SendTo, SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED).

---

Nitpick comments:
In `@docs/misra-conformance.md`:
- Line 87: Update the enum-constant wording at the cited paragraph to reflect
S10.22's single SCREAMING_SNAKE convention instead of the older
SolidSyslogClass_Constant framing: remove the reference to the unresolved
anonymous-enum split and state that constants like
SOLIDSYSLOG_SEVERITY_EMERGENCY and SOLIDSYSLOG_ADDRESS_SIZE follow
SCREAMING_SNAKE; note the two remediation options (treat anonymous-enum entries
as macro-equivalents and tighten the .clang-tidy regex, or rename them to a
class-prefixed PascalCase form) so the docs match the repo decision taken in
this PR.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8b572121-5be3-400e-b843-6e6ad3b7a879

📥 Commits

Reviewing files that changed from the base of the PR and between ebaf907 and fd9d470.

📒 Files selected for processing (66)
  • .clang-tidy
  • Bdd/Targets/FreeRtos/main.c
  • Bdd/Targets/Linux/BddTargetCommandLine.c
  • Bdd/Targets/Linux/main.c
  • Bdd/Targets/Windows/BddTargetWindows.c
  • Bdd/Targets/Windows/BddTargetWindowsCommandLine.c
  • Core/Interface/SolidSyslogBlockStore.h
  • Core/Interface/SolidSyslogCircularBuffer.h
  • Core/Interface/SolidSyslogDatagram.h
  • Core/Interface/SolidSyslogFileBlockDevice.h
  • Core/Interface/SolidSyslogPrival.h
  • Core/Interface/SolidSyslogTransport.h
  • Core/Source/BlockSequence.c
  • Core/Source/SolidSyslog.c
  • Core/Source/SolidSyslogBlockStore.c
  • Core/Source/SolidSyslogCircularBuffer.c
  • Core/Source/SolidSyslogFileBlockDevice.c
  • Core/Source/SolidSyslogMetaSd.c
  • Core/Source/SolidSyslogStreamSender.c
  • Core/Source/SolidSyslogUdpSender.c
  • DEVLOG.md
  • Platform/Atomics/Interface/SolidSyslogStdAtomicCounter.h
  • Platform/FreeRtos/Interface/SolidSyslogFreeRtosDatagram.h
  • Platform/FreeRtos/Interface/SolidSyslogFreeRtosMutex.h
  • Platform/FreeRtos/Interface/SolidSyslogFreeRtosStaticResolver.h
  • Platform/FreeRtos/Interface/SolidSyslogFreeRtosTcpStream.h
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosDatagram.c
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosMutex.c
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosStaticResolver.c
  • Platform/FreeRtos/Source/SolidSyslogFreeRtosTcpStream.c
  • Platform/Posix/Interface/SolidSyslogPosixMutex.h
  • Platform/Posix/Source/SolidSyslogGetAddrInfoResolver.c
  • Platform/Posix/Source/SolidSyslogPosixDatagram.c
  • Platform/Posix/Source/SolidSyslogPosixMutex.c
  • Platform/Windows/Interface/SolidSyslogWindowsAtomicCounter.h
  • Platform/Windows/Interface/SolidSyslogWindowsMutex.h
  • Platform/Windows/Source/SolidSyslogWindowsMutex.c
  • Platform/Windows/Source/SolidSyslogWinsockDatagram.c
  • Platform/Windows/Source/SolidSyslogWinsockResolver.c
  • Tests/Bdd/Targets/BddTargetServiceThreadTest.cpp
  • Tests/Bdd/Targets/BddTargetWindowsCommandLineTest.cpp
  • Tests/BlockSequenceTest.cpp
  • Tests/DatagramFake.c
  • Tests/DatagramFake.h
  • Tests/DatagramFakeTest.cpp
  • Tests/FreeRtos/SolidSyslogFreeRtosDatagramTest.cpp
  • Tests/FreeRtos/SolidSyslogFreeRtosStaticResolverTest.cpp
  • Tests/SolidSyslogBlockStoreDrainOrderingTest.cpp
  • Tests/SolidSyslogBlockStorePosixTest.cpp
  • Tests/SolidSyslogBlockStoreTest.cpp
  • Tests/SolidSyslogCircularBufferTest.cpp
  • Tests/SolidSyslogErrorTest.cpp
  • Tests/SolidSyslogGetAddrInfoResolverTest.cpp
  • Tests/SolidSyslogMetaSdTest.cpp
  • Tests/SolidSyslogPosixDatagramTest.cpp
  • Tests/SolidSyslogPosixMessageQueueBufferTest.cpp
  • Tests/SolidSyslogPrivalTest.cpp
  • Tests/SolidSyslogTest.cpp
  • Tests/SolidSyslogUdpSenderTest.cpp
  • Tests/SolidSyslogWinsockDatagramTest.cpp
  • Tests/SolidSyslogWinsockResolverTest.cpp
  • Tests/Support/ErrorHandlerFake.c
  • Tests/Support/ErrorHandlerFake.h
  • docs/NAMING.md
  • docs/misra-conformance.md
  • docs/misra-deviations.md

Comment thread Tests/DatagramFake.h

/* Per-call SendTo result (0-based). Calls beyond the configured slots
* return SolidSyslogDatagramSendResult_Sent by default. */
* return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_SENT by default. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix incorrect default-result behavior in the header comment.

Line 19 is inaccurate: calls beyond configured slots return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED (per SendTo), not ..._SENT.

Suggested comment fix
-    /* Per-call SendTo result (0-based). Calls beyond the configured slots
-     * return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_SENT by default. */
+    /* Per-call SendTo result (0-based). Calls beyond the configured slots
+     * return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED by default. */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_SENT by default. */
/* Per-call SendTo result (0-based). Calls beyond the configured slots
* return SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED by default. */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Tests/DatagramFake.h` at line 19, Update the inaccurate header comment that
currently states calls beyond configured slots return
SOLIDSYSLOG_DATAGRAM_SEND_RESULT_SENT; change it to correctly state they return
SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED to match the behavior implemented in
SendTo and the related test logic (reference symbols: DatagramFake, SendTo,
SOLIDSYSLOG_DATAGRAM_SEND_RESULT_FAILED).

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1119 passed, 🙈 2 skipped)
   🚦   build-freertos-host-tdd: 100% successful (✔️ 1239 passed, 🙈 2 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 1071 passed, 🙈 2 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1071 passed, 🙈 2 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 46 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: 90% successful (✔️ 44 passed, 🙈 5 skipped)
   🚦   bdd-freertos-qemu: 73% successful (✔️ 36 passed, 🙈 13 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 975 passed, 🙈 1 skipped)
   🚦   build-linux-tunable-override: 100% successful (✔️ 1071 passed, 🙈 2 skipped)
   ⚠️   Clang-Tidy: 9 warnings (normal: 9)
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@DavidCozens DavidCozens merged commit 3f11833 into main May 17, 2026
20 checks passed
@DavidCozens DavidCozens deleted the refactor/s10-22-enum-naming-restoration branch May 17, 2026 11:32
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.

S10.22: Enum naming convention restoration (SCREAMING_SNAKE)

1 participant