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

Sean Owen commented on SPARK-1590:
----------------------------------

To enable in IntelliJ, go to Preferences > Inspections and choose the 
inspection profile you have enabled for inspection. (At the bottom right of the 
editor window, click the small man icon and you can select a profile to use for 
continuously highlighting issues in your code in the editor.) Choose Scala from 
the dropdown. I enable Scala: General and Scala: Method signature.

It can flag some serious errors, but also small items to polish. For example it 
flags calls to Arrays.size instead of Arrays.length, which incur the overhead 
of a conversion. Or missing tail-recursion annotation, old format strings, etc.

It's easy to make a pass and fix these automatically; mostly a question of 
whether it would disruptive at this point as the changes tend to span many 
files.

> Recommend to use FindBugs
> -------------------------
>
>                 Key: SPARK-1590
>                 URL: https://issues.apache.org/jira/browse/SPARK-1590
>             Project: Spark
>          Issue Type: Question
>          Components: Build
>            Reporter: Shixiong Zhu
>            Assignee: Shixiong Zhu
>            Priority: Minor
>         Attachments: findbugs.png
>
>
> FindBugs is an open source program created by Bill Pugh and David Hovemeyer 
> which looks for bugs in Java code. It uses static analysis to identify 
> hundreds of different potential types of errors in Java programs.
> Although Spark is a Scala project, FindBugs is still helpful. For example, I 
> used it to find SPARK-1583 and SPARK-1589. However, the disadvantage is that 
> the report generated by FindBugs usually contains many false alarms for a 
> Scala project.



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

Reply via email to