Skip to content

Add OpenJDK Java Style Guidelines coverage infrastructure #18621

@vivek-0509

Description

@vivek-0509

Summary

This issue proposes adding infrastructure to support coverage tracking for the OpenJDK Java Style Guidelines. Similar to the existing Sun style coverage (sun_checks.xml + sun_style.xml), we would create a parallel structure for OpenJDK conventions.

Motivation

Checkstyle currently lacks a dedicated configuration and coverage documentation for the OpenJDK Java Style Guidelines (v6). This style guide is largely based on the original Sun conventions but includes a new set of rules and a some modifications. A dedicated configuration would make it easier for the community to enforce these guidelines.

Currently, Checkstyle provides:

  • sun_checks.xml - Configuration for Sun Code Conventions
  • google_checks.xml - Configuration for Google Java Style Guide

Adding openjdk_checks.xml would complete the coverage for major Java style guides.

Proposed Implementation

1. New Configuration File

  • openjdk_checks.xml - Checkstyle configuration based on OpenJDK guidelines

2. Documentation Page

  • openjdk_style.xml - Coverage documentation page showing which checks map to OpenJDK guidelines

3. Test Infrastructure

  • CheckUtil.java - Add getConfigOpenJdkStyleModules() method
  • XdocsPagesTest.java - Add validation for the new style
  • AbstractOpenJdkModuleTestSupport.java - Base class for future integration tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions