-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add error-prone.picnic.tech
featuring RedundantStringConversion
#5006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
5577787
to
84526f8
Compare
84526f8
to
bad204a
Compare
bad204a
to
7edc8cb
Compare
error-prone.picnic.tech
error-prone.picnic.tech
covering S1488: Local variables should not be declared and then immediately returned or thrown
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
cb987d5
to
c36f592
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2ct.
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
...r-engine/src/main/java/org/junit/jupiter/engine/extension/PreInterruptThreadDumpPrinter.java
Show resolved
Hide resolved
8132ffc
to
3337a15
Compare
error-prone.picnic.tech
covering S1488: Local variables should not be declared and then immediately returned or thrownerror-prone.picnic.tech
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
...r-engine/src/main/java/org/junit/jupiter/engine/extension/PreInterruptThreadDumpPrinter.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the effort spend.
...r-engine/src/main/java/org/junit/jupiter/engine/extension/PreInterruptThreadDumpPrinter.java
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
3337a15
to
6a78616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ready to go.
...form-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
2e35ad5
to
de9c855
Compare
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
de9c855
to
632aa90
Compare
error-prone.picnic.tech
error-prone.picnic.tech
featuring RedundantStringConversion
632aa90
to
71d9a54
Compare
using the Prone demands the manual fixes, not being an rewrite equivlent therefore a new mode might be needed. |
@Pankraz76 Could you please summarize the state of this PR? Is it ready to be reviewed? What do the changes mean for local builds and on CI? |
ExplanationSorry for the confusion, and thanks for considering. This is just a new error-prone check, originating from Picnic, and it behaves the same as the other rules for all builds. We can’t use the optional patching mode ( That means only the specified checks would run — leading to a successful local build but a failed CI build, since CI does not patch and still enforces all rules for quality control. In order to have patching, we would either need to
Both options are unrealistic, so we should move forward with the current setup and leave the patching topic aside for now — to stop staring and start finishing. Currently, Spotless uses a fully configured ruleset, which checks only the configured rules instead of following the convention. Given that the required changes here are minimal, keeping our current setup is the better approach. related: |
71d9a54
to
2b1d4ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now its small enough to be considerable. Thanks.
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the summary, that helped! 👍
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
9e669bc
to
fe42d5e
Compare
fe42d5e
to
9e6d69c
Compare
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts
Outdated
Show resolved
Hide resolved
"ConstantNaming", | ||
"DirectReturn", // https://github.com/junit-team/junit-framework/pull/5006#discussion_r2403984446 | ||
"FormatStringConcatenation", | ||
"IdentityConversion", | ||
"LexicographicalAnnotationAttributeListing", | ||
"LexicographicalAnnotationListing", | ||
"MissingTestCall", | ||
"NestedOptionals", | ||
"NonStaticImport", | ||
"OptionalOrElseGet", | ||
"PrimitiveComparison", | ||
"StaticImport", | ||
"TimeZoneUsage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to address these (except DirectReturn
) in separate PRs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Lexa is something easy to consider, if this meets the taste of the community.
Static import is something to suggest to avoid lots of redundant context. Collection.
stuff.
ConstantNaming
is also kind of a no-brainer, as it's the quintessence of JCC, but here it's not fixable.
We'll handle this successfully in Spotless, so this is something to investigate further.
Everything else is then up to the community, kind of, as we definitely need all of these, as we are failing them even though it should not be necessary! (since they are not all error severity, but even low-level like suggestion). Isn't it? @rickie
This itself indicates some misconfigured or problematic tooling.
Thank you both for the great learning experience - both technical and foremost in social regards, which is kind of a big challenge for me personally.
Please excuse me for being inconsistent sometimes.
Add comments to each disabled bug pattern
"DoNotCallSuggester", | ||
"ImmutableEnumChecker", | ||
"InlineMeSuggester", | ||
"DoNotCallSuggester", // We don`t want to use ErrorProne's annotations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now its very clear, thanks.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotationsLinks:
rewrite
support forerrorprone.refasterrules
#5002 (comment)