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

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

**Changes:**

1. Fixes most compiler warnings (except scala  inline warning)
2. Enables java doc building for project core, streaming, and all external 
projects like kafka.
3. Fixes Scaladoc and Javadoc compilation errors when updating java to jdk8, 
which has a more strict javadoc check.
4. Adds scalastyle check, the file is scalastyle-config.xml. 
5. Enforces scalastyle check and scaladoc/javadoc check when submitting a PR.
6. Don't allow using scala postfix syntax, for example "3 seconds" is not 
allowed now, please use 3.seconds instead.
7. Disables using "scala.collection.JavaConversions", as it does automatic 
conversion between java and scala, and encourage unnecessary conversions.
8. Removes all unicode chars.
9. Limits the line length to 100 chars.
10. Uses standard javadoc syntax. which is 
  {quote}
General description (In third person, Cap-first-letter. Instead of "Do", use 
"Does". Discourage using "will", "we" )

More Description

@param a Cap-letter description1
@param a Cap-letter description2
@param a Cap-letter description3
@return a Cap-letter description4
  {quote}
11. Discourages using of special scaladoc syntax. (As it is not friendly when 
generating javadoc from scala source code)
12. The importing statement should be grouped:

  {quote}
java imports
--- empty line ---
scala imports
--- empty line ---
third party imports
--- empty line ---
io.gearpump._ imports
  {quote}
13. Updates sbt to sbt 0.13.11, as it fixed many bugs.
14. Updates Akka to Akka 2.4.3 as it fixed a Akka-http warning issue (which 
keep printing "error connection not closed in 1 minutes")
15. Updates "com.softwaremill.akka-http-session" to "0.2.5"
16. Separates scalajs compiling with scala compiling. (Scalajs need to be 
compiled separately)
17. Adds more scaladoc/javadoc comments for public class and methods.
18. Updates bijectionVersion to 0.8.0
19. Updates travis to use latest jdk (As the built-in version 1.8.31 as some 
serious bugs)
20. Move "WorkerId" from package "io.gearpump" to "io.gearpump.cluster.worker"

**About code style**
We will use https://github.com/databricks/scala-style-guide as the foundation, 
with a few exceptions:
1. We still allow using ! and ? when sending akka message.
2. We still allow using System.currentTimeMillis

**TODO:**
Still need to fix the visibility issue. All class inside Gearpump which is not 
explicitly documented in gearpump.io should be considered private. We need to 
enforce it in code.

> 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)

Reply via email to