[
https://issues.apache.org/jira/browse/BEAM-4394?focusedWorklogId=116767&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-116767
]
ASF GitHub Bot logged work on BEAM-4394:
----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jun/18 04:23
Start Date: 28/Jun/18 04:23
Worklog Time Spent: 10m
Work Description: kennknowles commented on a change in pull request
#5797: [BEAM-4394] Spotless Java everywhere
URL: https://github.com/apache/beam/pull/5797#discussion_r198704400
##########
File path:
examples/java/src/main/java/org/apache/beam/examples/MinimalWordCount.java
##########
@@ -104,9 +104,11 @@ public static void main(String[] args) {
.apply(Count.perElement())
// Apply a MapElements transform that formats our PCollection of word
counts into a
// printable string, suitable for writing to an output file.
- .apply(MapElements
Review comment:
The examples have always been a funky place where manual formatting plays a
role. We could back off and make spotless opt-out and let the exampls opt-out.
Or really we should probably not apply the BeamModulePlugin to the examples.
They should be written entirely as user code with self-sufficient build
configuration. That doesn't come free, though.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 116767)
Time Spent: 2h (was: 1h 50m)
> 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
> Time Spent: 2h
> Remaining Estimate: 0h
>
> "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)