Skip to content

HIVE-30291: Indent switch case labels one level, per Google Java Style - #6998

Open
abstractdog wants to merge 1 commit into
apache:masterfrom
abstractdog:checkstyle-google-case-indent
Open

abstractdog wants to merge 1 commit into
apache:masterfrom
abstractdog:checkstyle-google-case-indent

Conversation

@abstractdog

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Set Checkstyle caseIndent from 0 to 2 (one indent level) in the root, standalone-metastore, storage-api and hcatalog configs, matching iceberg. Also make the Eclipse formatter in dev-support/eclipse-styles.xml indent case labels.

Why are the changes needed?

Google Java Style, Checkstyle's default and IntelliJ's default all indent case labels inside switch. Today that formatting is flagged by Checkstyle and SonarCloud. Nearly all arrow-style switches on master are already indented (68 of 74).

Does this PR introduce any user-facing change?

No.

How was this patch tested?

It is a configuration change only, so no tests were added.

Set Checkstyle caseIndent to 2 (one basicOffset level) in the root,
standalone-metastore, storage-api and hcatalog configs, matching the
iceberg module. Flip the Eclipse formatter to indent cases relative to
switch.

@deniskuzZ deniskuzZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, i always ignore switch case indent complains from sonar when it says switch and case should have same indentation

@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants