Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2universalStack: Logging
loggingreadabilitynitpick
Trim trailing punctuation from log messages
Drop dangling separators like a trailing ' -' from log message strings, especially after moving the error into a structured field.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | Logger.error({ err: error }, `POST ${api}/users -`); |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | Logger.error({ err: error }, `POST ${api}/users`); |
Explanation (EN)
Objašnjenje (HR)