[ https://jira.codehaus.org/browse/MCHECKSTYLE-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=328900#comment-328900 ]
Amichai Rothman commented on MCHECKSTYLE-186: --------------------------------------------- @Dipti, would you be able to share your working configuration? I've been struggling with this for hours as well, with various forms of includes/sourceDirectory/fileExtensions. Eventually I peeked at the source for DefaultCheckstyleExecutor.java, from which it appears that using the checkstyle-aggregate goal pretty much ignores the configured sourceDirectory. I switched to using the checkstyle goal and it finally picked up the xml files (under resources) and found the violations there. I'm not entirely sure how the sourceDirectory was desgined to function in aggregate, I'd assumed that I can configure it once in the parent (aggregator) and it would apply to the child modules and then aggregate the result, but the code seems to just take the standard build source directory for each child module, and ignoring the configured sourceDirectory when adding the files to process. If someone can confirm that this is indeed a bug, I'd be happy to open a separate issue for it. If the current behavior is by design, it would be useful to mention this in the documentation, seeing that it may not be intuitive for everyone. In addition, as logic and comments in the code say, it would be nice if the currently half-hacked resources directory treatment would be made generic: ideally, there would be a separate configuration for the sourcesDirectory, testSourcesDirectory and resourcesDirectory, and each one would have its own includes clause as well - for maximum configurability. > FileTabCharacter check not working > ---------------------------------- > > Key: MCHECKSTYLE-186 > URL: https://jira.codehaus.org/browse/MCHECKSTYLE-186 > Project: Maven 2.x Checkstyle Plugin > Issue Type: Bug > Reporter: Dipti Desai > Priority: Minor > > The FileTabCharacter check doesnt seem to work. Below is my config: > {code:xml} > <module name="Checker"> > .. > .. > <!-- No TAB characters in the source code --> > <module name="FileTabCharacter"> > <property name="eachLine" value="true" /> > <property name="fileExtensions" value="java,xml" /> > </module> > .. > .. > <module name="TreeWalker"> > .. > .. > </module> > </module> > {code} > I have my xml files - pom.xml and checkstyle config xml containing tabs but > none of them are flagged as violations. > Some additional info - my plugin config looks like this: > {code:xml} > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-checkstyle-plugin</artifactId> > <version>2.9.1</version> > <executions> > <execution> > <phase>verify</phase> > <goals> > <goal>check</goal> > </goals> > </execution> > </executions> > <configuration> > > <configLocation>checkstyle/kepler-checkstyle-config.xml</configLocation> > > <suppressionsLocation>${project.parent.basedir}${file.separator}checkstyle/kepler-checkstyle-suppressions.xml</suppressionsLocation> > </configuration> > </plugin> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira