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).
fullstack ruleP2universalStack: general
commentsdocumentationaccuracy
A comment must not contradict the code directly beneath it
When gating or behaviour changes, re-read the comment above it: a comment that says X is unaffected while the next lines gate X out is worse than no comment.
PR: hegnar-web#4698 FCK-3550 Drive ad suppression from the article flagCreated: Sep 7, 2026
Bad example
Old codets
| 1 | {# Consent, GTM, Linkpulse and Zephr are unaffected. #} |
| 2 | {% if not res.locals.adFree %}<!-- ZEPHR_FEATURE finansavisen-ads-meta -->{% endif %} |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | {# ... including the Zephr ad features (finansavisen-ads-meta, permutive-tracking). Consent, GTM, Linkpulse and the remaining Zephr features are unaffected. #} |
Explanation (EN)
Objašnjenje (HR)