-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Introduce Rewrite & PMD
covering S1144: Unused "private" methods should be removed
#18791
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?
Introduce Rewrite & PMD
covering S1144: Unused "private" methods should be removed
#18791
Conversation
❌ Gradle check result for bc07306: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
is this any good? @owaiskazi19 on a large scale static code analysis really pays off. Paying single price instead of constant cost of carry. Thanks to the new gen of tools like spot they convert the annoyance and risk to easy fixed delivered upfront. |
bc07306
to
8872b73
Compare
❌ Gradle check result for 8872b73: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
8872b73
to
5753137
Compare
❌ Gradle check result for 5753137: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Thanks a lot. I have given up, as the plugin changed. From working on a 8gb machine in 40 mins to running "endless" without maxing out CPU. @timtebeek do you have an idea what´s changed recently, causing this performance difference? As @hazendaz has pointed out correctly, every tool, including spotbugs, has some bugs. I will try to cover this as well like recent discovery suggested by @hazendaz.
not sure about that, most projects have some parsing error´s upfront, until its going into running recipe mode. Thats something advanced @timtebeek need to check out further. Appreciate it. |
RemoveUnusedPrivateMethods
Rewrite
fixing S1144
: Unused "private" methods should be removed
Rewrite
fixing S1144
: Unused "private" methods should be removedRewrite & PMD
fixing S1144
: Unused "private" methods should be removed
ddaec8b
to
6a7ddb7
Compare
@@ -76,9 +76,9 @@ Fork [opensearch-project/OpenSearch](https://github.com/opensearch-project/OpenS | |||
|
|||
#### JDK | |||
|
|||
OpenSearch recommends building with the [Temurin/Adoptium](https://adoptium.net/temurin/releases/) distribution. JDK 11 is the minimum supported, and JDK-24 is the newest supported. You must have a supported JDK installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-21`. |
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.
can not undo im sorry. will do if requested in final commit version by using different editor.
❌ Gradle check result for 6a7ddb7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
gradle/rewrite.gradle
Outdated
rewrite("org.openrewrite.recipe:rewrite-static-analysis:2.15.0") | ||
} | ||
|
||
tasks.check.dependsOn(rewriteDryRun) |
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.
i think its not possible to run this no default on dev machine.
Rewrite run should be the roundup solution to fix all the issues breaking the build/quality gate, just like already achieved with spotless.
PMD is fast enough to run locally on the other hand giving quick indication for broad errors, as some are in common. Other details recipes can not be covered of course, given the need to rewrite to run (in cloud).
6a7ddb7
to
f2b52bb
Compare
❌ Gradle check result for f2b52bb: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
f2b52bb
to
4100ee8
Compare
❌ Gradle check result for 4100ee8: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Updated the config accordingly. Please consider retest my simply executing ![]() This should work and sort out the smells targeted with PMD and automated with rewrite. Its just as with checkstyle and spotless there is a natural evolution in this. Could argue to keep both as each having its benefits and weaknesses, meaning for the same thing both finding stuff the other one dont making it truly a win. As rewrite takes so long PMD is a good candidate to run on dev while the big bang and mighty rewrite runs on CI. As @hazendaz has correctly pointed out that each tool having its benefits, making each a a win for every project, alone and of course having the biggest impact in combination. |
Rewrite & PMD
fixing S1144
: Unused "private" methods should be removedRewrite & PMD
covering S1144: Unused "private" methods should be removed
4100ee8
to
b41c35a
Compare
❌ Gradle check result for b41c35a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
I am not involved with this user @Pankraz76. I kindly ask this user stop using my name. |
please excuse me. Just wanted to pay the credits accordingly, as supported rewrite and PMD as well. Thanks. |
…ould be removed Signed-off-by: Vincent Potucek <[email protected]>
b41c35a
to
297f424
Compare
❌ Gradle check result for 297f424: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Kindly request some feedback on how to proceed here, thanks. @andrross |
apply:
fix:
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
related to:
PMD
covering S1144: Unused "private" methods should be removed spotbugs/spotbugs#3658