You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our codebase, we enforce strict rules against certain patterns such as @istest(SeeAllData=true) due to best practices. However, there are rare but valid cases, such as tests that call Connect API classes for Commerce Cloud, where SeeAllData=true is necessary.
Describe your Desired Solution
Currently, there is no apparent way to suppress specific rule violations inline in Apex code. We'd like to request support for inline suppression (e.g., via //NOPMD or similar syntax), so we can selectively override violations in justified cases without disabling the rule globally.
This would allow us to:
Maintain strict rule enforcement project-wide
Clearly indicate and document exceptions inline
Avoid false positives in reports
Please consider adding support for this feature to improve rule flexibility in real-world Apex scenarios.
Alternatives Considered
The alternative is to not block violations or override the rule globally to lower the score, both isn't desirable