Ability to check test sources using property maven.checkstyle.check.tests
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@192977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
61ac72325e
commit
83c7f3cbc9
@ -168,6 +168,20 @@
|
||||
|
||||
</ant:fileset>
|
||||
|
||||
<!-- run checkstyle on tests -->
|
||||
<j:if test="${(unitTestSourcesPresent == 'true') and (context.getVariable('maven.checkstyle.check.tests'))}">
|
||||
<ant:pathconvert property="testSrcSetString" pathSep="||||"
|
||||
refid="maven.test.compile.src.set"/>
|
||||
<u:tokenize var="testDirs" delim="||||">${testSrcSetString}</u:tokenize>
|
||||
|
||||
<j:forEach var="testDir" items="${testDirs}">
|
||||
<ant:fileset dir="${testDir}"
|
||||
includes="${maven.checkstyle.includes}"
|
||||
excludes="${maven.checkstyle.excludes}"/>
|
||||
</j:forEach>
|
||||
</j:if>
|
||||
|
||||
|
||||
<ant:classpath>
|
||||
<ant:path refid="maven.dependency.classpath"/>
|
||||
<ant:pathelement path="${maven.build.dest}"/>
|
||||
|
||||
@ -26,7 +26,8 @@ maven.checkstyle.fail.on.violation = false
|
||||
maven.checkstyle.cache.file = ${maven.build.dir}/checkstyle-cachefile
|
||||
maven.checkstyle.format = sun
|
||||
maven.checkstyle.header.file = ${basedir}/LICENSE.txt
|
||||
maven.checkstyle.check.tests=true
|
||||
|
||||
# If useFile is false then the checkstyle task will display violations
|
||||
# on stdout.
|
||||
maven.checkstyle.usefile = true
|
||||
maven.checkstyle.usefile = true
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="3.0-SNAPSHOT" date="in SVN">
|
||||
<action dev="carlos" type="add" issue="MPCHECKSTYLE-30">Ability to check test sources using property maven.checkstyle.check.tests</action>
|
||||
<action dev="carlos" type="add">Generate reports filtered by severity</action>
|
||||
<action dev="carlos" type="update">Support for Java5</action>
|
||||
<action dev="carlos" type="update">Upgraded to checkstyle 4.0</action>
|
||||
|
||||
@ -51,6 +51,14 @@
|
||||
exclude any files.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.checkstyle.check.tests</td>
|
||||
<td>Yes</td>
|
||||
<td>
|
||||
Whether to check test sources or not.
|
||||
The default value is <code>true</code>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.checkstyle.format</td>
|
||||
<td>Yes</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user