[ 
https://issues.apache.org/jira/browse/BEAM-4394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16495811#comment-16495811
 ] 

Kenneth Knowles commented on BEAM-4394:
---------------------------------------

Ah, missed this comment. Makes sense to go for it globally. It'll be good for 
the project as a whole. Personally, I'm also perfectly happy with smaller 
groups of contributors enabling it for particular modules.

The impact on contributors is almost nothing with good communication and timing.

1. Tell everyone that it is happening
2. Turn on enforcement
3. Everyone rebases with {{git checkout --theirs --}} which keeps their pending 
changes
4. Everyone runs the autoformat (they won't go green until they do)

> Consider enabling spotless java format throughout codebase
> ----------------------------------------------------------
>
>                 Key: BEAM-4394
>                 URL: https://issues.apache.org/jira/browse/BEAM-4394
>             Project: Beam
>          Issue Type: New Feature
>          Components: build-system
>            Reporter: Kenneth Knowles
>            Priority: Major
>
> "Spotless" can enforce - and automatically restore - automatic Java 
> formatting. Whenever formatting is off, it tells a user the exact command to 
> fix it.
> It isn't (just) about code layout, it is about automation. We have pretty 
> strict style rules enforced by checkstyle. The most efficient way to fix up a 
> file is with autoformat. But if the autoformat hits a bunch of irrelevant 
> lines, that is annoying for a reviewer and obscures git blame.
> If we enforce autoformat all the time, then it makes sure that autoformatting 
> a particular PR has minimal effects and is always safe to do.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to