Skip to content

Issue #16807: remove MemberNameCheck from SUPPRESSED_MODULES#19044

Merged
romani merged 1 commit intocheckstyle:masterfrom
Hajime-No-Ippo:issue-16807-membername
Mar 9, 2026
Merged

Issue #16807: remove MemberNameCheck from SUPPRESSED_MODULES#19044
romani merged 1 commit intocheckstyle:masterfrom
Hajime-No-Ippo:issue-16807-membername

Conversation

@Hajime-No-Ippo
Copy link
Contributor

@Hajime-No-Ippo Hajime-No-Ippo commented Feb 27, 2026

issue #16807.

PR Summary — Issue #16807: Remove MemberNameCheck from
SUPPRESSED_MODULES

What This PR Does

All input test files that reference MemberNameCheck now have every default property explicitly listed with the (default) tag. Because the files are already compliant (According to the issue#16807), the suppression is no longer needed.

The changes fall into 3 categories:


  1. Remove the suppression (InlineConfigParser.java)

MemberNameCheck is removed from SUPPRESSED_MODULES, enabling validateDefaultProperties() to run on all input files that use this module.


  1. Update two non-compliant input files to satisfy the validation

InputSuppressWarningsHolder8.java — was missing the (default) tag on format and missing all 4 applyTo* properties entirely.

InputTreeWalkerSuppressionCommentFilter.java — was missing all 4 applyTo* properties entirely.

Both files now declare all 5 default properties for MemberNameCheck:

  format           = (default)^[a-z][a-zA-Z0-9]*$
  applyToPublic    = (default)true
  applyToProtected = (default)true
  applyToPackage   = (default)true
  applyToPrivate   = (default)true

  1. Update hardcoded line numbers in two test files

Adding those properties to the file headers shifted the Java code inside each input file to new line numbers. The corresponding tests have hardcoded violation line numbers that must match:

  • SuppressWarningsHolderTest.java: "18:16" → "22:16" (header grew by
    4 lines)
  • TreeWalkerTest.java: "12:17" → "17:17" and "17:17" → "22:17"
    (header grew by 5 lines)

@Hajime-No-Ippo
Copy link
Contributor Author

CI failure are unrelated

@SURYANSHUAGRAWAL2006
Copy link
Contributor

Hello @Hajime-No-Ippo image your pr is too old please use command git rebase upstream/master if upstream is unidentify then firstly use git fetch upstream and then use previous command.

@Hajime-No-Ippo
Copy link
Contributor Author

Thanks for telling, working on it

@Hajime-No-Ippo Hajime-No-Ippo force-pushed the issue-16807-membername branch 8 times, most recently from 2eb5842 to d0d12c5 Compare March 1, 2026 17:06
@Hajime-No-Ippo Hajime-No-Ippo force-pushed the issue-16807-membername branch from d0d12c5 to ac75a23 Compare March 1, 2026 18:09
@Hajime-No-Ippo
Copy link
Contributor Author

@romani Hi sir, I had finish the clean up the suppression module, and it is ready for review

Copy link
Member

@romani romani left a comment

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 68c79b7 into checkstyle:master Mar 9, 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.

3 participants