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
Fix For: 1.4, 2.0
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