Repository navigation
refactor: clear SonarCloud's open code-smell findings - #696
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o helpers TestPushAuthorizationRequestBoundsPrompt, TestPushAuthorizationRequestRefusesResponseTypesOtherThanCode and FuzzNumericDateParse each move their checks into helpers, under SonarCloud's cognitive complexity limit. The fuzz target's floor check reads "<" instead of a negated ">=" (JSON has no NaN), and a federation test compares errors.Is directly. No test changes what it checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Clears six of SonarCloud's nine open issues on main, without changing behaviour:
server/complete_backchannel_authentication.go: the invalid-handle description, used three times, is one constant (S1192).TestPushAuthorizationRequestBoundsPrompt,TestPushAuthorizationRequestRefusesResponseTypesOtherThanCodeandFuzzNumericDateParsemove their checks into helpers, under the cognitive complexity limit of 15 (S3776). The tests check exactly what they did before.FuzzNumericDateParse's floor check uses<instead of a negated>=(S1940); JSON has no NaN, so the two are the same.errors.Isdirectly rather than through a variable (S8193).The other three (S8196:
pairwise.HMACOps,pairwise.Lookup,server.ResourcePolicynot named "-er") are released public API; renaming them would be a breaking change only for a naming convention, so they stay as they are.🤖 Generated with Claude Code