revelc/formatter-maven-plugin

New parameter failOnFormat

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
The developers IDE may not format according to the team-rules. Assuming this scenario:

  1. The team-formatting-rules say we have a max-line-length of 120.
  2. A developer X made no code-change but formatted a source-file wrong having 100 max-line-length.
  3. The developer X commit/push the source-modifications without calling formatter:format.
  4. Then a review of the source-file (using upsource for example) is intensive because almost every second line has pseudo-changes.

Today the 4th step is 100% manual work and may or may not lead to a 100% rejection of the developers commit.

This leads to a inharmoniousness between the committer and the reviewer. Inharmoniousness between collegues should be avoided.

Describe the solution you'd like
I like to have a jenkins-build that fail and notify the developers if they did not format the source according to the team-formatting-rules.

Describe alternatives you've considered
Intervention of the teamlead to blame the villain to force someones discipline using a whip or other painful furniture.

Describe the solution you'd like I like to have a jenkins-build that fail and notify the developers if they did not format the source according to the team-formatting-rules.

This is possible using formatter:validate
Here's one example of this being deployed in another project:

Describe alternatives you've considered Intervention of the teamlead to blame the villain to force someones discipline using a whip or other painful furniture.

LOL.

Gr8 tnx