You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Prashant Sharma (JIRA)" <ji...@apache.org> on 2014/03/31 10:57:14 UTC

[jira] [Commented] (SPARK-1338) Create Additional Style Rules

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

Prashant Sharma commented on SPARK-1338:
----------------------------------------

Can someone fix the Assignee and reporter for this issue. 

And also may be close with invalid if [~pwendell] agrees. Reason is we can not get the whitespaces they are eaten while parsing.

More details here https://github.com/ScrapCodes/scalastyle/commit/fb9476e6f02b43bbf446dd32ef9e8460c665c528

> Create Additional Style Rules
> -----------------------------
>
>                 Key: SPARK-1338
>                 URL: https://issues.apache.org/jira/browse/SPARK-1338
>             Project: Spark
>          Issue Type: Improvement
>          Components: Project Infra
>            Reporter: Patrick Cogan
>            Assignee: prashant
>
> There are a few other rules that would be helpful to have. Also we should add tests for these rules because it's easy to get them wrong. I gave some example comparisons from a javascript style checker.
> Require spaces in type declarations:
> def foo:String = X // no
> def foo: String = XXX
> def x:Int = 100 // no
> val x: Int = 100
> Require spaces after keywords:
> if(x - 3) // no
> if (x + 10)
> See: requireSpaceAfterKeywords from
> https://github.com/mdevils/node-jscs
> Disallow spaces inside of parentheses:
> val x = ( 3 + 5 ) // no
> val x = (3 + 5)
> See: disallowSpacesInsideParentheses from
> https://github.com/mdevils/node-jscs
> Require spaces before and after binary operators:
> See: requireSpaceBeforeBinaryOperators
> See: disallowSpaceAfterBinaryOperators
> from https://github.com/mdevils/node-jscs



--
This message was sent by Atlassian JIRA
(v6.2#6252)