Skip to content

STORM-8585: Sync checkstyle config with upstream google_checks.xml - #8969

Open
sercuzz8 wants to merge 5 commits into
apache:masterfrom
sercuzz8:8585-checkstyle-improvements
Open

STORM-8585: Sync checkstyle config with upstream google_checks.xml#8969
sercuzz8 wants to merge 5 commits into
apache:masterfrom
sercuzz8:8585-checkstyle-improvements

Conversation

@sercuzz8

@sercuzz8 sercuzz8 commented Aug 4, 2026

Copy link
Copy Markdown

Purpose

Update storm_checkstyle.xml to follow Google conventions google_checks.xml
There is no strong rationale but I saw it was originally used as a base.

Changes:

  • Splits OperatorWrap into OperatorWrapNL/OperatorWrapEOL so lambdas get upstream's dedicated EOL wrap rule.
  • Adds the missing BoxComments variant of TodoComment, catching box-like repetitive comment banners (e.g. // ====...).
  • Tightens the IndentationCheck suppression regex to upstream's anchored form.

Not in Google checkstyle:

Tests and Implementation

  1. mvn -pl storm-checkstyle install -DskipTests to rebuild the shared ruleset artifact.
  2. mvn validate across the full reactor (OK with BUILD SUCCESS or 0 Checkstyle violations / KO warranted code correction on interested lines until OK).

@sercuzz8
sercuzz8 force-pushed the 8585-checkstyle-improvements branch from 61c9bd5 to 99ce17f Compare August 4, 2026 21:17
@reiabreu

reiabreu commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@Gianluca Graziadei You started this one: #8585
I would like to hear your thoughts on this one

Comment thread bin/storm.py
extrajars=[USER_CONF_DIR, STORM_BIN_DIR])


def merge_args_preserving_order(sys_args, known_args, unknown_args):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this does not pertain checkstyle changes. What do you think about putting it in a separate PR?

@sercuzz8 sercuzz8 Aug 5, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did this just because not applying this fix blocked the execution of mvn validate and mvn clean install but I agree with this idea.
Just to be sure, can I use the same issue to propose this?
In any case, thank you for the attention and the advice.

@GGraziadei

Copy link
Copy Markdown
Member

Hi @sercuzz8, thanks for your effort and for driving this initiative!
To summarize where we stand on this issue apache/storm#8585 (comment), @sigee outlined the upgrade steps:

  • Steps 1 and 2 (Completed): Bumped Checkstyle and set the non-compliant rules to warning.
  • Step 3 (Current): Resolve the remaining warnings module by module ( via separate PRs per module to keep code reviews manageable).
  • Step 4 move back the warning in errors

That said, fixing these rules manually module by module can become quite tedious. I want to make sure your time and effort deliver the highest possible value to both you and the project.
With that in mind, what would you think about exploring an automated approach alongside or before this?
For example, configuring a Maven plugin could auto-fix many of these checkstyle warnings across the whole codebase in one go, preventing future technical debt altogether.

Either way, it's your call. Once we resolve the module warnings, we can consider aligning our checkstyle rules with the upstream Google manifest. When you're ready for that step, please open a proposal thread on dev@ first so we can gather community consensus.

What do you think?

@sercuzz8

sercuzz8 commented Aug 5, 2026

Copy link
Copy Markdown
Author

Hello @GGraziadei,
I agree with this solution, I saw that the issue was already well defined and I went with it but IMO this is better long-term.
I will sketch a solution before proposing this to the community to shorten possible delays.
Thank you for your attention and your advices

@sigee

sigee commented Aug 6, 2026

Copy link
Copy Markdown
Member

I agree with @reiabreu about the python change, besides that LGTM

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.

4 participants