-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[S1161] use staticanalysis.MissingOverrideAnnotation
to avoid missing @Override
on overriding and implementing methods
#48344
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
Conversation
/cc @ebullient (metrics), @jmartisk (metrics) |
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
is there any chance you can incorporate such low prio but big impact, selfcare topic? @geoand if you want to gain this increment and solve this flaws there is the need for static analysis. As you seem to be complain with rewrite this seems the best fit to reduce this kind of avoidable friction. ether by continue to ignore or to recognize and fix. |
I'm traveling, so I haven't been able to look at anything that takes more than a few minutes |
8956760
to
39b82d5
Compare
@gastaldi is this any good? |
39b82d5
to
cceddb5
Compare
core/launcher/src/main/java/io/quarkus/launcher/RuntimeLaunchClassLoader.java
Outdated
Show resolved
Hide resolved
hi @gsmet, kindly request your call on this. the parent seems to have all config already like expected. So the 9 times extra seems to be obsolete as all even the independent have luckily SSOT sharing same parent. if one gets called, all should like sharing same root: ![]() |
8e90b1a
to
8b049e5
Compare
independent-projects/parent/pom.xml
Outdated
@@ -15,8 +15,29 @@ | |||
|
|||
<packaging>pom</packaging> | |||
|
|||
<!-- please keep in alphabetical order --> |
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.
only plugin can handle this.
.github/dependabot.yml
Outdated
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin | ||
- dependency-name: net.revelc.code:impsort-maven-plugin | ||
- dependency-name: org.openrewrite.maven:rewrite-maven-plugin | ||
- dependency-name: com.diffplug.spotless:spotless-maven-plugin |
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.
it would be great to only use rewrite and include eclipse format, currently implemented with formatter-maven-plugin/spot
, into rewrite by supporting new format.
ed5e10c
to
a453ea9
Compare
@@ -48,12 +48,10 @@ public void collectInput() throws IOException { | |||
return; | |||
} | |||
final TerminalConnection connection = new TerminalConnection(); | |||
connection.setSignalHandler(interruptionSignalHandler()); | |||
try { |
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.
@@ -86,8 +86,8 @@ updates: | |||
- dependency-name: org.apache.maven.plugins:* | |||
- dependency-name: org.codehaus.mojo:* | |||
- dependency-name: io.fabric8:docker-maven-plugin | |||
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin |
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.
spot is already added only for kotlin but not used.
As spot is covering the impsort-maven-plugin
as well, we can have 2 for 1 plugin meaning only spot for having current functionality.
rewrite then goes beyond whitespaces fixing real issues and flaws.
Is this a way to go for the dev team?
This will integrate silent without breaking current workflow, but even fixing any.
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.
assuming as already in touch
quarkus/independent-projects/tools/devtools-common/src/main/resources/openrewrite-init.gradle
Line 10 in 3060ddd
classpath("org.openrewrite:plugin:{pluginVersion}") |
or does the plugin usage interfere anything? @timtebeek
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.
the leal topic (licence) is not involved, right?
or does the plugin usage interfere anything?
I fail to understand what you mean by this comment; can you provide more context when tagging folks?
It's hard to drop in somewhere and then having to parse a whole lot when you want my input on something.
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 sorry.
does the licence of rewrite effect on quarkus, when using the plugin?
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.
So up to now, after some friendly coordination late last year, the folks at Quarkus are only using Apache Licensed components of OpenRewrite, such as the rewrite-maven-plugin, rewrite-core/java, rewrite-java-dependencies and of course rewrite-quarkus.
In this PR you look to be adding rewrite-static-analysis
in independent-projects/parent/pom.xml
as a build plugin. That would still be very much allowed by our licensing terms, but different teams have different tastes for exposure to other-than-traditional OSS licenses, even if it's just a build dependency.
From my earlier chats with the folks at Quarkus/Red Hat I'd say it's likely they'd be appreciative of the code changes made by recipes, but perhaps not willing to make rewrite-static-analysis part of their build pipeline. Any Apache Licensed recipes would not have any such hurdles to clear. I can't speak for them of course; just telling you what I'd expect.
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 detailed exposition.
allowed by our licensing terms
So the licence seems not to be an issue, giving the ability to leverage rewrite-maven-plugin
.
Is there an limit to only use rewrite-static-analysis
, or could we use all the other goodness, as well?
Like rewrite-testing-frameworks
, rewrite-rewrite
highlighting bestpractices, as there are several different around.
- https://docs.openrewrite.org/recipes/java/testing/cleanup/bestpractices
- https://docs.openrewrite.org/recipes/java/recipes/javarecipebestpractices
Treat the plugin as found- and limitation.
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.
The licenses for every module are listed here:
The terms for the various licenses are here, with a clear FAQ at the end as well:
In short the folks here (and other end users in general) are welcome to use any of the Apache or MSAL modules for their own code and purposes.
@Override
on overriding and implementing methods by consolidating rewrite
and spotless
rewrite
and spotless
to avoid missing @Override
on overriding and implementing methods
a453ea9
to
68edb09
Compare
rewrite
and spotless
to avoid missing @Override
on overriding and implementing methodsrewrite
to avoid missing @Override
on overriding and implementing methods
rewrite
to avoid missing @Override
on overriding and implementing methodsorg.openrewrite.staticanalysis.MissingOverrideAnnotation
to avoid missing @Override
on overriding and implementing methods
org.openrewrite.staticanalysis.MissingOverrideAnnotation
to avoid missing @Override
on overriding and implementing methodsstaticanalysis.MissingOverrideAnnotation
to avoid missing @Override
on overriding and implementing methods
…OverRide on overriding and implementing methods
7d56b32
to
ee17500
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.
License of the module is not acceptable for the Quarkus build.
Thanks for update. Then only alternative seems PMD to achieve common baseline: Autofix is nice so have. Rewrite took too long anyways so it would be very hard to integrate considering the runtime gain of 1h plus. |
[S1161] fix build setup to avoid missing
@Override
on overriding and implementing methods by consolidatingrewrite
andspotless
.While its not required, it still seems best practice to do so.
take advantage of the compiler check:
refs:
rewrite-maven-plugin
: Introduce OpenRewrite by Moderne apache/maven#2322