refactor: suppress S3776 on CharacterValidationStage.isCharacterAllowed - #92
Conversation
Cognitive complexity is 16 vs the 15 limit — one over. The sequential per-character-class guards are each simple and read more clearly inline than split across helper methods, so suppress rather than fragment the method. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @cuioss-oliver, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: cuioss/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds a @SuppressWarnings("java:S3776") annotation to the isCharacterAllowed method in CharacterValidationStage.java to suppress a SonarQube warning regarding cognitive complexity, accompanied by an explanatory comment. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Suppresses the lone open SonarCloud finding on
main:java:S3776(cognitive complexity 16 vs the 15 limit — one over) onCharacterValidationStage.isCharacterAllowed.The method is a flat sequence of per-character-class guards (null byte, control chars including the unconditional CR/LF header rejection, extended ASCII, Unicode). Each branch is trivial and reads more clearly inline than fragmented across helper methods, so it's suppressed with a justifying comment rather than split.
No behavior change; existing
CharacterValidationStageTest(27 tests) passes.