问题
We have a legacy system that we have taken into our project and building upon. I would be interested in not only analyse the whole project in Sonar, but also to only analyse code added after a specific date. So is it possible in sonar to retrieve a static analysis "view" (coverage, violations, lines of code, etc.) only on code that has been added after a specific date? This would be very helpful! Thanks.
回答1:
You can define the specific date in period configuration of project, this post can help you. Period for sonar is "Period used to compare measures and track new violations".
回答2:
You can use the Cut off plugin ( http://docs.codehaus.org/display/SONAR/Cutoff+Plugin ) that allows you to exclude files from analysis based on a cutoff date threshold (or a cutoff period). Any source file that was last modified prior to the configured cutoff date is excluded.
来源:https://stackoverflow.com/questions/13256968/possible-in-sonar-to-only-view-analysis-done-on-new-code