Skip to content

Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: MemberName #15018

@mahfouz72

Description

@mahfouz72

child of #14942
I have read check documentation: https://checkstyle.org/checks/naming/membername.html
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words

From check documentation:

Checks that instance variable names conform to a specified pattern.

instance variables can't be unnamed

PS D:\CS\test> cat src/Test.java                                                
import java.util.PriorityQueue;
import java.util.Queue;

public class Test {
  final static int _ = 0;
}
PS D:\CS\test> javac  src/Test.java
src\Test.java:5: error: underscore not allowed here
  final static int _ = 0;
                   ^
1 error
PS D:\CS\test> 

Describe what you expect in detail.

no update is needed here. this can be closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions