Skip to content

Issue #18612: Remove redundant tokens property from CustomImportOrder in google_checks.xml#18651

Merged
romani merged 1 commit into
checkstyle:masterfrom
pirzada-ahmadfaraz:fix/remove-redundant-tokens-customimportorder
Feb 5, 2026
Merged

Issue #18612: Remove redundant tokens property from CustomImportOrder in google_checks.xml#18651
romani merged 1 commit into
checkstyle:masterfrom
pirzada-ahmadfaraz:fix/remove-redundant-tokens-customimportorder

Conversation

@pirzada-ahmadfaraz

Copy link
Copy Markdown
Contributor

Fixes #18612

Summary

The tokens property was dropped from CustomImportOrder in #12145. Since getAcceptableTokens() returns getRequiredTokens(), the tokens cannot be customized - they are fixed to IMPORT, STATIC_IMPORT, and PACKAGE_DEF.

The tokens property in google_checks.xml has no effect and should be removed.

Changes

Removed the redundant line:

<property name="tokens" value="IMPORT, STATIC_IMPORT, PACKAGE_DEF"/>

@romani

romani commented Jan 30, 2026

Copy link
Copy Markdown
Member

@pirzada-ahmadfaraz , please update commit message to follow our requirements.
and we will merge this PR.
run on local "mvn clean verify"

thanks a lot for your help

@pirzada-ahmadfaraz pirzada-ahmadfaraz force-pushed the fix/remove-redundant-tokens-customimportorder branch from 936cd1a to 11aed7b Compare February 1, 2026 18:40
@pirzada-ahmadfaraz

Copy link
Copy Markdown
Contributor Author

Rebased on latest master. Build passes locally (tests skipped due to Java 25/Mockito incompatibility on my machine, but CI uses JDK 21).

@romani

romani commented Feb 1, 2026

Copy link
Copy Markdown
Member

Please read https://ci.appveyor.com/project/Checkstyle/checkstyle/builds/53468175/job/n1qtbhmyi8p1o744#L1277
And follow what is required by build.
CI is always right

@Aman-Baliyan

Aman-Baliyan commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

@pirzada-ahmadfaraz this is the issue of ci failure fix this then ci will pass.

[ERROR] Failures: 
[ERROR]   CommitValidationTest.testCommitMessageHasProperStructure:221 Commit 11aed7b47ffd0abcdf82465d272049ee9086a795 message: "Issue #18612: Remove redundant tokens property from CustomImportOrder\n\nThe tokens property was dropped from CustomImportOrder in #12145.\nSince getAcceptableTokens() returns getRequiredTokens(), the tokens\ncannot be customized - they are fixed to IMPORT, STATIC_IMPORT, and\nPACKAGE_DEF. The property in google_checks.xml has no effect.\n" is invalid
Proper commit message should adhere to the following rules:
    1) Must match one of the following patterns:
        ^Issue #\d+: .*$
        ^Pull #\d+: .*$
        ^(minor|config|infra|doc|spelling|dependency|supplemental): .*$
    2) It contains only one line of text
    3) Must not end with a period, space, or tab
    4) Commit message should be less than or equal to 200 characters

The rule broken was: 2
[INFO] 
[ERROR] Tests run: 5718, Failures: 1, Errors: 0, Skipped: 2

@pirzada-ahmadfaraz pirzada-ahmadfaraz force-pushed the fix/remove-redundant-tokens-customimportorder branch from 11aed7b to aee4e8a Compare February 5, 2026 09:28
@pirzada-ahmadfaraz pirzada-ahmadfaraz force-pushed the fix/remove-redundant-tokens-customimportorder branch from aee4e8a to f2f6b87 Compare February 5, 2026 09:36
@pirzada-ahmadfaraz

Copy link
Copy Markdown
Contributor Author

@romani all good?

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

Thanks a lot

@romani romani merged commit d0dcddf into checkstyle:master Feb 5, 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.

Redundant tokens property in CustomImportOrder of google_checks.xml

3 participants