Skip to content

Issue #19188: Move non-compilable Input files to resources-noncompilable folders#19551

Merged
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-19188-move-noncompilable-inputs
Apr 2, 2026
Merged

Issue #19188: Move non-compilable Input files to resources-noncompilable folders#19551
romani merged 1 commit into
checkstyle:masterfrom
ayushactiveat:issue-19188-move-noncompilable-inputs

Conversation

@ayushactiveat

@ayushactiveat ayushactiveat commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #19188

->moved java 21+ input files from src/test/resources/ to
src/test/resources-noncompilable/
->moved java 21+ input files from src/it/resources/ to
src/it/resources-noncompilable/
->moved xdocs example files from src/xdocs-examples/resources/ to
src/xdocs-examples/resources-noncompilable/
->updated related test files to use getNonCompilablePath()
instead of getPath()
->updated the affected *.xml.template files with the right paths
->added // non-compiled with javac: compilable with Java21 comments to xdocs example files

@ayushactiveat ayushactiveat force-pushed the issue-19188-move-noncompilable-inputs branch 2 times, most recently from 579a1a0 to a9b181d Compare March 31, 2026 17:06
@stoyanK7

stoyanK7 commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

Github, generate site

@stoyanK7

stoyanK7 commented Apr 1, 2026

Copy link
Copy Markdown
Collaborator

@ayushactiveat

I checked out this PR branch and ran a random test locally via IDEA. This is the result:
image

Could you please check locally if you get the same compilation error on these files? If so, please move these 8 files to their respective *-noncompilable/* folder. If not, please let me know.

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Comment on lines +107 to +123
<!-- Suppress for non-compilable xdocs example filesets moved from resources -->
<suppress id="presenceOfCompilationComment"
files="finallocalvariable[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="missingnullcaseinswitch[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="patternvariableassignment[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="unusedcatchparametershouldbeunnamed[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="unusedlambdaparametershouldbeunnamed[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="unusedlocalvariable[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="whenshouldbeused[\\/].*"/>
<suppress id="presenceOfCompilationComment"
files="finalparameters[\\/].*"/>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of suppressing this absence of a compilation comment, please add instead a compilation comment to each file:

[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example2.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example3.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example4.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example5.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/missingnullcaseinswitch/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/patternvariableassignment/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedcatchparametershouldbeunnamed/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedlambdaparametershouldbeunnamed/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/unusedlocalvariable/Example2.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/coding/whenshouldbeused/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/finalparameters/Example1.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/finalparameters/Example2.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/finalparameters/Example3.java:1: Missing compilation comment [presenceOfCompilationComment]
[ERROR] [checkstyle] [ERROR] /tmp/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/checks/finalparameters/Example4.java:1: Missing compilation comment [presenceOfCompilationComment]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure thing

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.

Why suppression?
We should put comment in them

@ayushactiveat ayushactiveat force-pushed the issue-19188-move-noncompilable-inputs branch from a9b181d to 110af6d Compare April 1, 2026 20:36
@ayushactiveat

Copy link
Copy Markdown
Contributor Author

hi @stoyanK7 , thanks for the review, i've addressed both your points, please let me know if u still face the error, or if there any else change needed

@ayushactiveat ayushactiveat force-pushed the issue-19188-move-noncompilable-inputs branch 2 times, most recently from b75617c to 4e1f62b Compare April 1, 2026 20:45
@ayushactiveat ayushactiveat force-pushed the issue-19188-move-noncompilable-inputs branch from 4e1f62b to 54360c7 Compare April 1, 2026 21:07
@romani

romani commented Apr 2, 2026

Copy link
Copy Markdown
Member

Why not to put comment to https://github.com/checkstyle/checkstyle/blob/master/src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/coding/finallocalvariable/Example1.java ?

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

There are bunch of items to improve, but let me merge this as first big step and
In follow up PR we will fix details

@romani romani merged commit ea04f28 into checkstyle:master Apr 2, 2026
123 checks passed
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.

Move Intputs to non-compiled folders to let Idea to run test without compilation error

3 participants