Skip to content

Improve examples of StaticVariableName #20880

Closed

Description

@romani

https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/26f8014_20260720054154/checks/naming/staticvariablename.html#Examples

Change All Examples to do vertical alignment of all comment with violation.

class Example1 {
  public static int goodStatic = 2;
  private static int badStatic = 2;
  public static int ItStatic1 = 2;    // violation, 'must match pattern'
  protected static int ItStatic2 = 2; // violation, 'must match pattern'
  private static int ItStatic = 2;    // violation, 'must match pattern'
  public static int it_static = 2;    // violation, 'must match pattern'
  public static int It_Static = 2;    // violation, 'must match pattern'
  private static int It_Static1 = 2;  // violation, 'must match pattern'
  static int It_Static2 = 2;          // violation, 'must match pattern'
}

look at https://github.com/checkstyle/checkstyle/pull/20849/changes for files that needs to be updated

Activity

  1. priyanshuvishwakarma273403 commented on Jul 20, 2026

    @priyanshuvishwakarma273403

    Hi, I would like to work on this issue.
    Can you assign it to me?

  2. added 2 commits that reference this issue on Jul 20, 2026
  3. romani commented on Jul 20, 2026

    @romani
    MemberAuthor

    PR is already sent by @arimu1

  4. added a commit that references this issue on Jul 20, 2026
  5. romani commented on Jul 20, 2026

    @romani
    MemberAuthor

    Fix is merged

  6. added this to the 13.9.0 milestone on Jul 20, 2026
  7. added a commit that references this issue on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions