Skip to content

Remove blanket suppression for compact source file test inputs once all checks support compact source files #1078

@vivek-0509

Description

@vivek-0509

Remove blanket suppression for compact source file test inputs once all checks support compact source files

Context

To support JEP 512 (Compact Source Files and instance main), the grammar now parses compact source files into a COMPACT_COMPILATION_UNIT root (see checkstyle/checkstyle#17810). Individual checks are being made compact-aware one by one. Until that work is complete, many checks either throw (for example, RequireThis NPEs when there is no class frame for the implicit unnamed class) or raise false positives on compact-source test inputs. To avoid adding scattered per-file suppressions for every new compact input, we are adding a single blanket suppression covering all compact-source test inputs:

**/resources-noncompilable/**/Input*CompactSourceFile*.java

Location to remove

The suppression to remove lives in:

#local-checkstyle|local|../../../|master|**/.ci-temp/**/*,**/resources-noncompilable/**/asttreestringprinter/**/*,**/resources-noncompilable/**/filefilters/**/*,**/resources-noncompilable/**/main/**/*,**/resources-noncompilable/**/suppressionsstringprinter/**/*,**/resources-noncompilable/**/gui/**/*,**/resources-noncompilable/**/javadocpropertiesgenerator/**/*,src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/javaparser/InputJavaParser.java,**/InputAllEscapedUnicodeCharacters.java,**/resources-noncompilable/**/javaparser/InputJavaParser.java,**/resources-noncompilable/**/checks/imports/unusedimports/InputUnusedImportsSingleWordPackage.java,**/target/test-classes/**/*,**/resources-noncompilable/**/treewalker/**/*,**/resources-noncompilable/**/defaultlogger/**/*,**/resources-noncompilable/**/InputCompactSourceFile.java,**/resources-noncompilable/**/InputCompactSourceFileWithModifiers.java,**/resources-noncompilable/**/InputRedundantModifierCompactSourceFile.java

Task

This is a tracking issue to remove that blanket suppression once every check supports compact source files, so we do not leave a permanent blanket exclusion in place.

Parent tracker: checkstyle/checkstyle#19971 (Java 25 compact source files and instance main).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions