Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479#18440
Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479#18440Pankraz76 wants to merge 1 commit into
spotbugs and pmd config with rewrite #18454 #18479#18440Conversation
|
I don't understand problem |
|
yes, its strange that no other PR seems to build. But different PR seems fine so lets observe. |
CI, adjust spotless configspotbugs and pmd CI config
| cd .ci-temp/spotbugs-and-pmd | ||
| ./mvnw -e --no-transfer-progress clean test-compile pmd:check | ||
| cd .ci-temp/pmd | ||
| grep "Processing_Errors" "$CHECKSTYLE_DIR/target/site/pmd.html" | cat > errors.log |
There was a problem hiding this comment.
do we actually need this extra extra ?
| ;; | ||
|
|
||
| pmd) | ||
| ./mvnw -e --no-transfer-progress clean test-compile pmd:check |
There was a problem hiding this comment.
why not just use simple check like in spotbugs and spotless.
We already on happy path being complain. All we do is baby steps not on local dev env.
romani
left a comment
There was a problem hiding this comment.
I don't understand reason of update.
If you will not stop doing unrelated updates, I will put you in ignore list, please keep your productivity on leash.
we having lots of custom overhead code for no reason. Look into changes. We doing some crazy pmd stuff you dont even notice or want to explain. The code just makes not sense when looking into detail. I know some dont understand the detail, but they matter most! The is just working but on a very strange and costly way, there is actually no need to have this kind of silliness around.
no worry, I will leave the project anytime soon! |
|
this a low hanging fruit ready to be merged. Having made extra comments everywhere. If you dont want to consider just tell me but dont make excuses you dont know whats going no. Im trying to help here and make the project leaner avoiding its questions without any answers given... |
spotbugs and pmd CI configspotbugs and pmd config with rewrite
| -Dpmd.skip=true -Dspotbugs.skip=true -Djacoco.skip=true | ||
| ;; | ||
|
|
||
| spotbugs-and-pmd) |
There was a problem hiding this comment.
why having this overhead? can we not use simple KISS prinicple?
There was a problem hiding this comment.
CI job start will cost more than execution of job, so grouping is happening
There was a problem hiding this comment.
yes thats fine. Still its the question to spend 30 sek compiling to not have a dedicated feedback. If the build takes several mins. i would see that point more critical.
There was a problem hiding this comment.
why having this overhead? can we not use simple KISS prinicple?
also im not asking directly to split, but why having the file handling for pmd? We just want to call the check goal, thats it.
c912af1 to
01f56e4
Compare
| # https://github.com/spotbugs/spotbugs-maven-plugin/issues/806 explains | ||
| # why we need execution of spotbugs without any other maven plugins which can change binaries | ||
| - validate-with-maven-script: | ||
| name: "spotbugs-and-pmd" |
There was a problem hiding this comment.
this the main benefit and change of PR. Single concern principle.
ae58156 to
ad69697
Compare
| echo "Checkout target sources ..." | ||
| checkout_from "https://github.com/pmd/build-tools.git" | ||
| cd .ci-temp/build-tools/ | ||
| mvn -e --no-transfer-progress install |
There was a problem hiding this comment.
maybe should use same mvn instance all over
| echo "Spotbugs" | ||
| ./mvnw -e --no-transfer-progress spotbugs:check | ||
| echo "PMD" | ||
| ./mvnw -e --no-transfer-progress pmd:check |
There was a problem hiding this comment.
does maven cash the compile phase somehow? it would be nice to have dedicated calls , if not merge again.
| image-name: "cimg/openjdk:17.0.7" | ||
| command: "./.ci/no-exception-test.sh no-exception-samples-gradle" | ||
| - validate-with-maven-script: | ||
| name: "no-exception-samples-maven" |
There was a problem hiding this comment.
having moved to exception block
| command: ./.ci/validation.sh git-check-pull-number | ||
| cli-validation: | ||
| jobs: | ||
| - yamllint |
| exit $fail | ||
| ;; | ||
|
|
||
| checkstyle-and-sevntu) |
There was a problem hiding this comment.
and = coupling which seems the forbidden fruit all around in arch software design. Why should we not follow this fundamental principe here as well? This is actually the root cause of this issue so we should try to keep it real...
| export MAVEN_OPTS='-Xmx2g' | ||
| ./mvnw -e --no-transfer-progress clean verify -DskipTests -DskipITs \ | ||
| -Dpmd.skip=true -Dspotbugs.skip=true -Djacoco.skip=true | ||
| ./mvnw -e --no-transfer-progress clean checkstyle:check |
There was a problem hiding this comment.
idk but this smells, as we fail to apply convention principle:
Caused by: org.apache.maven.plugin.MojoFailureException: You have 13302 Checkstyle violations.
23d37e0 to
459966b
Compare
| command: "./.ci/validation.sh no-error-test-sbe" | ||
| name: sevntu | ||
| image-name: *cs_img | ||
| command: ./.ci/validation.sh sevntu |
spotbugs and pmd config with rewrite #18454spotbugs and pmd config with rewrite #18454 #18479
8bc3b31 to
5913649
Compare
| -Xep:ExplicitEnumOrdering:ERROR | ||
| -Xep:FormatStringConcatenation:ERROR | ||
| -Xep:IdentityConversion:ERROR | ||
| <!-- -Xep:IdentityConversion:ERROR --> |
There was a problem hiding this comment.
| <goal>compile</goal> | ||
| </goals> | ||
| <configuration> | ||
| <failOnError>false</failOnError> |
There was a problem hiding this comment.
why not keep it simple stupid?
| # | ||
| # - name: Execute Error-Prone on test-compile phase | ||
| # if: always() | ||
| # run: groovy ./.ci/error-prone-check.groovy test-compile |
There was a problem hiding this comment.
avoiding all this extra extra ?
Once we good to go and passing CI, everything is done locally. Maybe not need this just fail on error.
There was a problem hiding this comment.
actually would have expected @rickie to be around. Whats you call on this, how should we integrate this proper.
There was a problem hiding this comment.
AFAIK the CI does correctly flag it when Error Prone finds something, so not sure if there is a problem here.
|
item |
afc280e to
0acf198
Compare
| * @return a version string based on the package implementation version | ||
| */ | ||
| private static String replaceVersionString(String report) { | ||
| final String version = SarifLogger.class.getPackage().getImplementationVersion(); |
There was a problem hiding this comment.
The “trillion” example shows why this kind of coupling nonsense feels pretty clunky.
At that point, the code makes little sense; it’s mostly written that way because of the coupling. Of course, it could be done in a functional, inline style, but that’s unlikely, since it would blow up the space and hurt readability.
It also shows that this super noisy, repetitive typing obviously wasn’t enough to make it clear that String.valueOf(String) is not a great idea.
So after just one line, we’ve already forgotten all the context. That’s why doing things inline in small steps, with high cohesion, always seems like a smart idea, IMHO.
|
I lost a purpose of this PR |


Issue #18470: Align
spotbugsandpmdconfig withrewrite#18454 #18479