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

Lewis John McGibbney commented on NUTCH-1109:
---------------------------------------------

Although this is good for independently reviewing code, there is an alternative 
which (if desired) could could trigger from a post Jenkins nightly build.

Details of the Jenkins Sonar plugin can be found here [1]

>From some reading I have done on this, i see the main benefit of using it as 
>follows
1) It gives us a general idea of the standardisation in format, structure, and 
consistency across the entire Nutch code base
2) Once we establish what an 'acceptable' level of critical, major, minor and 
info warnings we get, then it enables us to automatically evaluate the quality 
of any larger chunks of code which are being proposed for integration into the 
code base.

This is more a quality assurance measure than a quality control one.  

[1] http://docs.codehaus.org/display/SONAR/Hudson+and+Jenkins+Plugin  

> Add Sonar targets to Ant build.xml
> ----------------------------------
>
>                 Key: NUTCH-1109
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1109
>             Project: Nutch
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 1.4, 2.0
>            Reporter: Lewis John McGibbney
>            Assignee: Lewis John McGibbney
>            Priority: Minor
>              Labels: build
>             Fix For: 1.4, 2.0
>
>         Attachments: NUTCH-1109-branch-1.4-20110910.patch, 
> sonar-ant-task-1.1.jar
>
>
> Sonar [1] is an open platform to manage code quality. I was experimenting 
> today with what kind of analysis it allows us to do on a given codebase and 
> was pleasantly surprised with the results. For details on the documentation 
> please see here [2]. It can be easily integrated into our ant build.xml and 
> is an easy way to explicitly identify latent areas of code which we could 
> possibly improve upon. 
> At this stage I wish to highlight some of my statistics in findings...
> Running Sonar via the attached patch identifies (based upon the analysis 
> rules from Sonar) that the Branch-1.4 codebase contains issues as follows
> {code}
> Critical 28           
> Major         1,231           
> Minor         356             
> Info  119
> {code}
> These range from a catch statement being identified in o.a.n.crawl.Generator 
> which shouldn't be catching throwable since it includes errors, through to 
> trivial issues such as nested statements which could be combined in the same 
> class.
> Although on the face of it, this seems an excellent way to make code more 
> consistent across the board, which may in turn lead to 'better' code, I am by 
> no way saying that this is a step we should move towards without thinking it 
> through and discussing at length. I also think that there needs to be a good 
> deal of our own judgement to decide whether any issues flagged up by Sonar 
> should be marked as false positives.
> To conclude I would like to add that I onl decided to open this issue in an 
> attempt to gauge peoples views on the direction it takes us in.
> [1] http://www.sonarsource.org/
> [2] http://docs.codehaus.org/display/SONAR/Documentation

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to