Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ It provides a **standardized project structure**, ensuring best practices for:
---

## 🚀 Getting Started
Following steps must be followed for getting started with logging repository:

### 1️⃣ Clone the Repository

Expand Down
1 change: 1 addition & 0 deletions score/datarouter/error/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ enum class LoggingErrorCode : score::result::ErrorCode
kNoFileFound = 1,
kParseError,
kNoChannelsFound
kThisEnumIsOnlyForTesting
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Recommended

[Maintainability] The new enumerant kThisEnumIsOnlyForTesting is added to the public LoggingErrorCode contract even though it is strictly for tests. Because this header is the shipped error-domain interface, exposing a test-only value leaks test concerns across the API boundary and invites downstream code to depend on a code that has no runtime meaning, making later removal a breaking change. Keep test-only error codes in test-only headers or behind conditional compilation so the public API continues to describe only production errors.

Additionally, there's a missing comma after kNoChannelsFound on line 30 — without it, this code will not compile. If the test-only enumerant is retained (even temporarily), add the comma: kNoChannelsFound,.

Context for Agents
The new enumerant `kThisEnumIsOnlyForTesting` is added to the public `LoggingErrorCode` contract even though it is strictly for tests. Because this header is the shipped error-domain interface, exposing a test-only value leaks test concerns across the API boundary and invites downstream code to depend on a code that has no runtime meaning, making later removal a breaking change. Keep test-only error codes in test-only headers or behind conditional compilation so the public API continues to describe only production errors.

Additionally, there's a missing comma after `kNoChannelsFound` on line 30 — without it, this code will not compile. If the test-only enumerant is retained (even temporarily), add the comma: `kNoChannelsFound,`.

File: score/datarouter/error/error.h
Line: 31

};

class LoggingErrorDomain final : public result::ErrorDomain
Expand Down
Loading