Skip to content

Pull #18589: Add NullArgumentForNonNullParameter #17988 #17985 #18479#18589

Merged
romani merged 1 commit into
checkstyle:masterfrom
Pankraz76:fix-erro-prone-ci
Jan 24, 2026
Merged

Pull #18589: Add NullArgumentForNonNullParameter #17988 #17985 #18479#18589
romani merged 1 commit into
checkstyle:masterfrom
Pankraz76:fix-erro-prone-ci

Conversation

@Pankraz76

@Pankraz76 Pankraz76 commented Jan 10, 2026

Copy link
Copy Markdown

Pull #18589: Add NullArgumentForNonNullParameter #17988 #17985 #18479

Comment thread pom.xml
Comment thread pom.xml Outdated
</goals>
<configuration>
<failOnError>false</failOnError>
<failOnError>true</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.

🦢
without this its no fun, leaking all the error to prod.

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.

We have no leaks, execution is wrapped by groovy to handle errors

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.

command is locally not working

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.

please run locally and show me output:

./mvnw -e --no-transfer-progress clean compile -P error-prone-compile

we dont see errors because they not 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.

We have no leaks, execution is wrapped by groovy to handle errors

this the leckage:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/circleci/project/src/test/java/com/puppycrawl/tools/checkstyle/AbstractModuleTestSupport.java:[651,23] [NullArgumentForNonNullParameter] Null is not permitted for this parameter.
(see https://errorprone.info/bugpattern/NullArgumentForNonNullParameter)
[ERROR] /home/circleci/project/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java:[294,32] [NullArgumentForNonNullParameter] Null is not permitted for this parameter.
(see https://errorprone.info/bugpattern/NullArgumentForNonNullParameter)
[INFO] 2 errors
[INFO] -------------------------------------------------------------

@romani romani Jan 11, 2026

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.

This how CI is not leaking anything

- name: Execute Error-Prone on compile phase
run: groovy ./.ci/error-prone-check.groovy compile

Execution without groovy is for users on local to reproduce validation.

This is required, because error prone did not have reports, so we have to parse output, brutal, but works. Root reason is no report that we can parse after execution.
It will allow us to fail on error and get all violations

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.

we dont need violations, we need need just to fail bbuild like. in rewrite pmd spotbugs or spotless. we just nneed stability and no extra extra.

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.

Extra script helped us to fix all violations gradually, it will stay, even we are at 0 violations level.
It can help at #18599 to enable all to errors by single PR, to resolve later existing problems, but new problems will not be leaked

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.

This has not been the first time you brought this up in this repository @Pankraz76.

@romani and team have Error Prone setup with a Groovy script as he mentions. That's how they prefer it, so that's how it'll be. So no need to change anything about it 😄.

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.

@rickie , if there will be some native approach for external config suppression, it would be awesome and we can remove extra groovy wrapper.

Fixing old problems might take some time, but we would like to freeze all old problems and not let new problem to popup on new rules.

@Pankraz76

Copy link
Copy Markdown
Author

item

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/circleci/project/src/test/java/com/puppycrawl/tools/checkstyle/AbstractModuleTestSupport.java:[651,23] [NullArgumentForNonNullParameter] Null is not permitted for this parameter.
(see https://errorprone.info/bugpattern/NullArgumentForNonNullParameter)
[ERROR] /home/circleci/project/src/test/java/com/puppycrawl/tools/checkstyle/utils/TokenUtilTest.java:[294,32] [NullArgumentForNonNullParameter] Null is not permitted for this parameter.
(see https://errorprone.info/bugpattern/NullArgumentForNonNullParameter)
[INFO] 2 errors
[INFO] -------------------------------------------------------------

@Pankraz76 Pankraz76 marked this pull request as ready for review January 10, 2026 11:35
@Pankraz76 Pankraz76 changed the title Issue #18470: Fix error-prone CI config #17988 #17985 Pull #18589: Fix error-prone CI config #17988 #17985 Jan 10, 2026
@Pankraz76 Pankraz76 changed the title Pull #18589: Fix error-prone CI config #17988 #17985 Pull #18589: Fix error-prone CI config #17988 #17985 #18479 Jan 10, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 10, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 11, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 11, 2026
Comment thread README.md
Comment thread .github/workflows/error-prone.yml
@Pankraz76

Copy link
Copy Markdown
Author

so root cause is like always different config. @romani

when executing with convention principle its finding 2 more issues.

@Pankraz76

Copy link
Copy Markdown
Author

see the number −466 its hard to argue to have so much crazy cost for what? what makes check so special to be so extra extra? its just another java code base.

Comment thread pom.xml
Comment thread README.md
[link check]:https://github.com/checkstyle/checkstyle/actions/workflows/run-link-check.yml
[link check img]:https://github.com/checkstyle/checkstyle/actions/workflows/run-link-check.yml/badge.svg

[error prone]:https://github.com/checkstyle/checkstyle/actions/workflows/error-prone.yml

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.

thats kind of a flex we could have this for rewrite as well and spotless.

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.

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.

pmd also missing here but its broken anyways so thats something else.

@Pankraz76 Pankraz76 requested a review from rickie January 16, 2026 15:16
@Pankraz76

Copy link
Copy Markdown
Author

ty, for kind reply.

@romani

romani commented Jan 18, 2026

Copy link
Copy Markdown
Member

this PR must have changes only for NullArgumentForNonNullParameter , enablement of rule and code changes only for it.

@Pankraz76

Copy link
Copy Markdown
Author

yes lets split.

@Pankraz76

Copy link
Copy Markdown
Author

this PR must have changes only for NullArgumentForNonNullParameter , enablement of rule and code changes only for it.

rdy 2 merge, ty for effort given.

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

Copy link
Copy Markdown
Author

curl: (22) The requested URL returned error: 503

@Pankraz76

Copy link
Copy Markdown
Author

this PR must have changes only for NullArgumentForNonNullParameter , enablement of rule and code changes only for it.

applied requested change. Kindly consider merge.

@Pankraz76

Copy link
Copy Markdown
Author

@romani kindly asking why you not considering my shit anymore?

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

this update is good, thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants