You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2016/01/13 09:52:39 UTC

[jira] [Commented] (SPARK-12692) Scala style: check no white space before comma

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

Reynold Xin commented on SPARK-12692:
-------------------------------------

Some discussion on one of the pull requests:

@sarutak I actually reverted this change after talking more with Michael and looking at the diffs. The problem is that for colon, in some cases it is really useful to have a space before colon. In particular:

In many cases for type bounds, ti is good to have a space before the colon so it is more clear.
For type descriptions (e.g. variable : Int), it is also often useful to have a space.
I don't know whether it is feasible to actually implement the rules for the general colon, but exclude type description and type bounds. If yes, we should add this enforcement. Otherwise I'd prefer not to have it at all.

For comma, we should always have it (at least I haven't seen a case in which we don't want it yet).


> Scala style: check no white space before comma
> ----------------------------------------------
>
>                 Key: SPARK-12692
>                 URL: https://issues.apache.org/jira/browse/SPARK-12692
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Project Infra
>            Reporter: Kousuke Saruta
>            Assignee: Kousuke Saruta
>             Fix For: 2.0.0
>
>
> We should not put a white space before `,` and `:` so let's check it.
> Because there are lots of style violation, first, I'd like to add a checker, enable  and let the level `warn`.
> Then, I'd like to fix the style step by step.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org