Skip to content

Improve Spotless Integration: Enhance CI Workflow #7308

@YongGoose

Description

@YongGoose

In the last PR, there was a suggestion that our CI could be more helpful when code style checks fail.

Currently, the CI fails silently without guiding contributors on how to fix the issue.
To improve the developer experience, I propose two enhancements to the CI workflow:

1. Prompt contributors when formatting fails

If code formatting does not meet expectations, the workflow should print a clear message such as:

Code style check failed. Please run `mvn spotless:apply` locally to fix formatting issues.

This behavior is common in projects like Dubbo and helps reduce confusion for new contributors.

2. Auto-format code and commit to PR

IMHO, It would be great if CI workflow to not only check formatting but also apply fixes via mvn spotless:apply and push them directly to the PR.

However, I'm not sure whether this is technically feasible. 😅
If anyone in the community has experience with this or knows more about it, your input would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions