Skip to content

Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479#18440

Closed
Pankraz76 wants to merge 1 commit into
checkstyle:masterfrom
Pankraz76:fix-ci
Closed

Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479#18440
Pankraz76 wants to merge 1 commit into
checkstyle:masterfrom
Pankraz76:fix-ci

Conversation

@Pankraz76

@Pankraz76 Pankraz76 commented Dec 27, 2025

Copy link
Copy Markdown

Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479

Comment thread .ci/validation.sh Outdated
@Pankraz76 Pankraz76 marked this pull request as ready for review December 27, 2025 12:05
@Pankraz76 Pankraz76 marked this pull request as draft December 27, 2025 12:57
@Pankraz76 Pankraz76 marked this pull request as ready for review December 27, 2025 13:16
@romani

romani commented Dec 27, 2025

Copy link
Copy Markdown
Member

I don't understand problem

@Pankraz76

Copy link
Copy Markdown
Author

yes, its strange that no other PR seems to build. But different PR seems fine so lets observe.

@Pankraz76 Pankraz76 changed the title Issue #16543: Fix CI, adjust spotless config Issue #16543: Dedicate spotbugs and pmd CI config Dec 28, 2025
Comment thread .ci/validation.sh Outdated
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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we actually need this extra extra ?

Comment thread .ci/validation.sh
;;

pmd)
./mvnw -e --no-transfer-progress clean test-compile pmd:check

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .circleci/config.yml
Comment thread .circleci/config.yml
Comment thread .circleci/config.yml
Comment thread .circleci/config.yml Outdated
Comment thread .ci/validation.sh Outdated

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Pankraz76

Pankraz76 commented Dec 30, 2025

Copy link
Copy Markdown
Author

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.

I will put you in ignore list

no worry, I will leave the project anytime soon!

@Pankraz76 Pankraz76 requested a review from romani December 30, 2025 06:52
@Pankraz76

Copy link
Copy Markdown
Author

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...

@Pankraz76 Pankraz76 changed the title Issue #16543: Dedicate spotbugs and pmd CI config Issue #16543: Align spotbugs and pmd config with rewrite Dec 30, 2025
Comment thread .ci/validation.sh
-Dpmd.skip=true -Dspotbugs.skip=true -Djacoco.skip=true
;;

spotbugs-and-pmd)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why having this overhead? can we not use simple KISS prinicple?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI job start will cost more than execution of job, so grouping is happening

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Pankraz76 Pankraz76 force-pushed the fix-ci branch 3 times, most recently from c912af1 to 01f56e4 Compare December 30, 2025 10:14
Comment thread .circleci/config.yml
# 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"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this the main benefit and change of PR. Single concern principle.

@Pankraz76 Pankraz76 force-pushed the fix-ci branch 4 times, most recently from ae58156 to ad69697 Compare December 31, 2025 10:09
Comment thread .ci/validation.sh
Comment thread .ci/validation.sh
echo "Checkout target sources ..."
checkout_from "https://github.com/pmd/build-tools.git"
cd .ci-temp/build-tools/
mvn -e --no-transfer-progress install

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe should use same mvn instance all over

Comment thread .ci/validation.sh Outdated
echo "Spotbugs"
./mvnw -e --no-transfer-progress spotbugs:check
echo "PMD"
./mvnw -e --no-transfer-progress pmd:check

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does maven cash the compile phase somehow? it would be nice to have dedicated calls , if not merge again.

Comment thread .circleci/config.yml
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"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having moved to exception block

Comment thread .semaphore/semaphore.yml
Comment thread .circleci/config.yml
command: ./.ci/validation.sh git-check-pull-number
cli-validation:
jobs:
- yamllint

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you asked how it would be simpler imho if possible this would help: With the colon : it has same style and does not look lost anymore.

Image

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
Comment thread .ci/validation.sh
exit $fail
;;

checkstyle-and-sevntu)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Comment thread .ci/validation.sh Outdated
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

@Pankraz76 Pankraz76 Jan 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk but this smells, as we fail to apply convention principle:

Caused by: org.apache.maven.plugin.MojoFailureException: You have 13302 Checkstyle violations.

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
@Pankraz76 Pankraz76 force-pushed the fix-ci branch 2 times, most recently from 23d37e0 to 459966b Compare January 1, 2026 10:56
Comment thread .circleci/config.yml Outdated
command: "./.ci/validation.sh no-error-test-sbe"
name: sevntu
image-name: *cs_img
command: ./.ci/validation.sh sevntu

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one not working as expected, also its called somwhere else. Idk if we have to keep it here. It does not work locally.

Image

@Pankraz76 Pankraz76 changed the title Issue #18470: Align spotbugs and pmd config with rewrite #18454 Issue #18470: Align spotbugs and pmd config with rewrite #18454 #18479 Jan 1, 2026
@Pankraz76 Pankraz76 force-pushed the fix-ci branch 2 times, most recently from 8bc3b31 to 5913649 Compare January 1, 2026 11:49
Comment thread pom.xml Outdated
-Xep:ExplicitEnumOrdering:ERROR
-Xep:FormatStringConcatenation:ERROR
-Xep:IdentityConversion:ERROR
<!-- -Xep:IdentityConversion:ERROR -->

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread pom.xml
<goal>compile</goal>
</goals>
<configuration>
<failOnError>false</failOnError>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not keep it simple stupid?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also convention principle.

Comment thread .github/workflows/error-prone.yml Outdated
#
# - name: Execute Error-Prone on test-compile phase
# if: always()
# run: groovy ./.ci/error-prone-check.groovy test-compile

@Pankraz76 Pankraz76 Jan 1, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually would have expected @rickie to be around. Whats you call on this, how should we integrate this proper.

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the CI does correctly flag it when Error Prone finds something, so not sure if there is a problem here.

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 1, 2026
@Pankraz76

Copy link
Copy Markdown
Author

item

Run docker://rhysd/actionlint:latest
/usr/bin/docker run --name rhysdactionlintlatest_10391d --label 4620a9 --workdir /github/workspace --rm -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp":"/github/runner_temp" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/checkstyle/checkstyle":"/github/workspace" rhysd/actionlint:latest
.github/workflows/diff-report.yml:59:13: constant expression "true" in condition. remove the if: section [if-cond]
   |
59 |         if: 'true'
   |             ^~~~~~

@Pankraz76 Pankraz76 force-pushed the fix-ci branch 2 times, most recently from afc280e to 0acf198 Compare January 1, 2026 12:27
* @return a version string based on the package implementation version
*/
private static String replaceVersionString(String report) {
final String version = SarifLogger.class.getPackage().getImplementationVersion();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@romani

romani commented Jan 2, 2026

Copy link
Copy Markdown
Member

I lost a purpose of this PR

@romani romani closed this Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants