repairnator icon indicating copy to clipboard operation
repairnator copied to clipboard

Code Style check

Open martinezmatias opened this issue 5 years ago • 7 comments

Does Repairnator follow a code style?

Would be necessary to automatically check the style before merging?

martinezmatias avatar Nov 26 '20 07:11 martinezmatias

It did, but bot anymore.

Since Repairnator is a repair tool, my dream is to activate a style repair directly (à la Styler or Restyled), without going through the old-school check-only step.

monperrus avatar Nov 26 '20 07:11 monperrus

Since Repairnator is a repair tool, my dream is to activate a style repair directly (à la Styler or Restyled), without going through the old-school check-only step.

Perfect.

martinezmatias avatar Nov 26 '20 08:11 martinezmatias

How about implementing the spotless plugin for maven?

I would be happy to help you implement this and move forward with its integration if you want.

We can do this by a simple GitHub Action.

ohbus avatar Feb 09 '21 11:02 ohbus

Thanks for the proposal. Could you elaborate on what spotless would do?

monperrus avatar Feb 10 '21 12:02 monperrus

Spotless will do code style just like checkstyle during maven build, using spotless:check.

What it can also achieve is that apply the necessary changes in code style for it to be compliant to using spotless:apply

ohbus avatar Feb 12 '21 04:02 ohbus

Could we have spotless:apply as part of CI? (for instance as an automated PR)

monperrus avatar Feb 12 '21 08:02 monperrus

We can extend the functionality using GitHub Actions to automate any validations check if there are any!

ohbus avatar Feb 12 '21 11:02 ohbus