Skip to content

Conversation

@swamirishi
Copy link
Contributor

What changes were proposed in this pull request?

Disable multiline alignment for function definitions in the checkstyle configuration

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-13088

How was this patch tested?

No unit tests required only checkstyle changes

…tions in ozone checkstyle

Change-Id: I5cf300722d7ca79a0bda58952eab9f331fb4a749
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @swamirishi for the patch. I think existing code uses different value.

@adoroszlai
Copy link
Contributor

Default value of lineWrappingIndentation is 4, so I'm not sure this change will make any difference.

What we need is forceStrictCondition=true to disallow indents more than 4. But it will also require fixing indentation in existing code.

Force strict indent level in line wrapping case. If value is true, line wrap indent have to be same as lineWrappingIndentation parameter. If value is false, line wrap indent could be bigger on any value user would like.

@adoroszlai
Copy link
Contributor

No unit tests required only checkstyle changes

The question is more generic than just unit tests. For a checkstyle change:

  • confirm that checkstyle check passes
  • introduce violation (locally or in test branch) to verify that checkstyle catches it

@adoroszlai adoroszlai changed the title HDDS-13088. Disable parameter alignment in multi-line function definitions in ozone checkstyle HDDS-13088. Checkstyle: reject too large indentation in wrapped lines May 21, 2025
@adoroszlai adoroszlai marked this pull request as draft May 21, 2025 04:42
@adoroszlai
Copy link
Contributor

I have tried adding forceStrictCondition=true: it will introduce 17K violations. So we'll need to make the change gradually.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants