Skip to content

refactor: suppress S3776 on CharacterValidationStage.isCharacterAllowed - #92

Merged
cuioss-oliver merged 1 commit into
mainfrom
fix/suppress-charvalidation-complexity
Jul 10, 2026
Merged

cuioss-oliver merged 1 commit into
mainfrom
fix/suppress-charvalidation-complexity

Conversation

@cuioss-oliver

Copy link
Copy Markdown
Collaborator

Suppresses the lone open SonarCloud finding on main: java:S3776 (cognitive complexity 16 vs the 15 limit — one over) on CharacterValidationStage.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.

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>
@cuioss-oliver cuioss-oliver added the skip-bot-review Skip automated review bots for this PR label Jul 10, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @cuioss-oliver, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • skip-bot-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: cuioss/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 844c42e2-a1fe-4174-818a-dc2748ecdbb0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cuioss-oliver
cuioss-oliver enabled auto-merge (squash) July 10, 2026 15:02

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@cuioss-oliver
cuioss-oliver merged commit 7febd31 into main Jul 10, 2026
20 checks passed
@cuioss-oliver
cuioss-oliver deleted the fix/suppress-charvalidation-complexity branch July 10, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-bot-review Skip automated review bots for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant