[
http://jira.codehaus.org/browse/MOJO-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=134906#action_134906
]
David Vicente commented on MOJO-1119:
-------------------------------------
I think this configuration must be done in the default-dashboard-config.xml
which can be overloading by any user instead of in the pom.xml.
we must add a weight value for each plugin to generate an overall health
indicator for the project
and multi-config for quality for all project's phases
as
{code:xml}
<qualityconfigs selectedconfigid="quality.min">
<qualityconfig id="quality.max" label="end-term project config">
<section id="cobertura.qa" title="Cobertura Quality
Config" groupId="org.codehaus.mojo" artifactId="cobertura-maven-plugin">
<weight value="10">
<thresholds>
<threshold level="max"
label="congratulations!" color="green" value="0.6"/>
<threshold level="middle" label="not so
bad" color="orange" value="0.4"/>
<threshold level="min" label="write
more tests!" color="red" value="0"/>
</thresholds>
</section>
<section id="surefire.qa" title="Surefire Quality
Config" groupId="org.apache.maven.plugins"
artifactId="maven-surefire-report-plugin">
<weight value="15">
<thresholds>
<threshold level="max"
label="congratulations!" color="green" value="1"/>
<threshold level="middle" label="not so
bad" color="orange" value="0.8"/>
<threshold level="min" label="fix your
backward compatibility issues" color="red" value="0"/>
</thresholds>
</section>
</qualityconfig>
<qualityconfig id="quality.min" label="start-term project
config">
<section id="cobertura.qa" title="Cobertura Quality
Config" groupId="org.codehaus.mojo" artifactId="cobertura-maven-plugin">
<weight value="5">
<thresholds>
<threshold level="max"
label="congratulations!" color="green" value="0.4"/>
<threshold level="middle" label="not so
bad" color="orange" value="0.2"/>
<threshold level="min" label="write
more tests!" color="red" value="0"/>
</thresholds>
</section>
<section id="surefire.qa" title="Surefire Quality
Config" groupId="org.apache.maven.plugins"
artifactId="maven-surefire-report-plugin">
<weight value="5">
<thresholds>
<threshold level="max"
label="congratulations!" color="green" value="0.3"/>
<threshold level="middle" label="not so
bad" color="orange" value="0.2"/>
<threshold level="min" label="fix your
backward compatibility issues" color="red" value="0"/>
</thresholds>
</section>
</qualityconfig>
</qualityconfigs>
{code}
> Add quality thresholds
> ----------------------
>
> Key: MOJO-1119
> URL: http://jira.codehaus.org/browse/MOJO-1119
> Project: Mojo
> Issue Type: Wish
> Components: dashboard
> Reporter: Gregory Levilain
> Assignee: David Vicente
>
> In order for all reports to be more meaningful in the context of a project,
> allow defining some thresholds for each report.
> For instance :
> {noformat}
> <configuration>
> <thresholds>
> <param>cobertura|0%|Code coverage|write more tests!|red</param>
> <param>cobertura|40%|Code coverage|not so bad|orange</param>
> <param>cobertura|60%|Code
> coverage|congratulations!|green</param>
> <param>surefire|0%|Unit tests success|fix your backward
> compatibility issues|red</param>
> <param>surefire|100%|Unit tests
> success|congratulations!|green</param>
> <param>checkstyle|0.0per-file|Coding syntax
> problems|congratulations!|green</param>
> <param>checkstyle|1.0per-file|Coding syntax problems|not so
> bad|orange</param>
> <param>checkstyle|2.0per-file|Coding syntax problems|fix your
> checkstyle errors!|red</param>
> <param>findbugs|0.0per-file|Detected
> bugs|congratulations!|green</param>
> <param>findbugs|1.0per-file|Detected bugs|not so
> bad|orange</param>
> <param>findbugs|2.0per-file|Detected bugs|fix your findbugs
> errors!|red</param>
> </thresholds>
> </configuration>
> {noformat}
> So, for a project with
> - 50% code coverage with cobertura,
> - 99% of surefire success,
> - an average of 0.5 checkstyle error per file,
> - an average of 2.0 findbugs errors per file,
> the report will generate the following table :
> |Code coverage|50%|{color:orange}not so bad{color}|
> |Unit tests success|99%|{color:red}fix your backward compatibility
> issues{color}|
> |Coding syntax problems|0.5 per-file|{color:green}congratulations!{color}|
> |Detected bugs|2.0 per-file|{color:red}fix your findbugs errors!{color}|
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email