Repository navigation
build(sonar): scope out the style rules and keep the ones that find defects - #43
Merged
Merged
Conversation
…efects Sonar listed 532 open issues, nearly all code smells that measure size or taste, and the few that it typed as bugs were false positives. The code-smell rules for size, style, modern-Java suggestions and test style are scoped out for the whole repository (ADR-0042); every bug, vulnerability and defect-hiding smell rule stays on, and the quality gate is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both can point at a real defect (a swallowed exception, a copy-paste branch), so ADR-0042 keeps them with the other defect-hiding smells. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
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.



Sonar listed 532 open issues on
main, nearly all code smells that measure size or taste (a variable deliberately namedignored, a constant beside a same-named field in a different case, empty methods in test doubles, cognitive complexity, duplicated literals, "use a record"). Fixing one costs a refactor that defends no behaviour, and the real findings were buried. The few that Sonar typed as bugs turned out to be false positives here.What changes
pom.xmlscopes out 27 code-smell rules for the whole repository, grouped by why: size and shape, style the project's conventions contradict, modern-Java suggestions, and test style. Every bug and vulnerability rule and every smell that can hide a defect (dead stores, unused parameters, identical methods, serialisation, mutable statics) stays on.Verification
./mvnw -N help:evaluateresolves the new properties, so the POM parses and the entries are read.Files.createTempFile(S5443),Throwablecollected from test workers (S1181), interrupts restored byDeadlines.cancelledor ending a thread-owning loop (S2142), constantintproducts (S2184), a timedtryAcquire(S899), TCK assertions (S5960), the benchmark report's stdout (S106), no-op arms of exhaustive switches (S108), and one exhaustive switch over sealed record types (S1871). The remaining open real findings are 2 serialisation (S1948), 1 regex depth (S5998) and a few small smells.maindrops them.🤖 Generated with Claude Code