gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Zhong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEARPUMP-11) Fix code styles by following practice of other projects
Date Mon, 11 Apr 2016 18:07:25 GMT

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

Sean Zhong commented on GEARPUMP-11:
------------------------------------

Most obvious code style problems are fixed. With these exceptions:
1. Most monadic chaining problems are NOT fixed. Modifying chaining need deep inspection on
code logic.
2. Symbolic Methods of built-in scala libraries are NOT fixed.. 
3. Implicit definition that are NOT obvious or safe to remove are NOT fixed..
4. Exception Handling using NonFatal are NOT fixed. We still use try catch(ex Exception) for
now. It is safe for us,  as we removed all "return" statement. But eventually, we should all
use NonFatal.
5. Some java API are NOT fixed (It is not easy and requires deep inspection)
6. Some wildcard Importing are NOT fixed. We also allows user to import wildcard elements
from companion object.

However, for new code, we should follow the code style at https://github.com/databricks/scala-style-guide#imports,
with modification like this:

1. Still allow using ! and ? for actorRef.
2. Still allow using System.currentTimeMillis
3. Still allow importing fields defined in companion object with wildcard.


> Fix code styles by following practice of other projects
> -------------------------------------------------------
>
>                 Key: GEARPUMP-11
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-11
>             Project: Apache Gearpump
>          Issue Type: Bug
>          Components: doc
>    Affects Versions: 0.8.0
>            Reporter: Sean Zhong
>            Assignee: Sean Zhong
>              Labels: doc
>             Fix For: 0.8.1
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> *Motive:*
> 1. Scala is very flexible, if not having a code style guide in place, then it will easily
be out of control. 
> 2. There are a lot of doc errors which cannot be parsed by Scaladoc and JavaDoc. We should
fix them.
> *Suggestions:*
> 1. We can use Spark code style as major reference  https://github.com/databricks/scala-style-guide,
with a few modifications. 
> 2. All doc errors should be fixed. 



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

Mime
View raw message