You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Vorburger (JIRA)" <ji...@apache.org> on 2016/07/25 21:40:20 UTC

[jira] [Created] (MCHECKSTYLE-328) Intro. new config. property to add additional resources

Michael Vorburger created MCHECKSTYLE-328:
---------------------------------------------

             Summary: Intro. new config. property to add additional resources
                 Key: MCHECKSTYLE-328
                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-328
             Project: Maven Checkstyle Plugin
          Issue Type: Improvement
            Reporter: Michael Vorburger


We'd like to run some of our non-Java (not TreeWalker) Checkstyle modules such as FileTabCharacter, RegexpSingleline for "\s+$" => "Line has trailing spaces." or RegexpMultiline for "(\r\n|\r)" => "Line has Windows line delimiter." on things like build configuration files like pom.xml.

The trouble is that such files, e.g. pom.xml, are not in src/main|test/resources, and thus not part of what maven-checkstyle-plugin has Checkstyle go over, even with <includeResources> (or <includeTestResources>) true.

I thought we could just add something like "./pom.xml" (or perhaps, ideally, even an Ant-like FileSet "*" to mean "all files in project root, but not "**/*" in all sub-directories - if Maven even supports this?) to a property, but ... unless I'm missing something, there is no such property.

There IS a sourceDirectories which "Specifies the location of the source directories to be used for Checkstyle" and a defaults to ${project.compileSourceRoots} (and a testSourceDirectories).

How about also offering a configurable... resourceDirectories (and a resourceDirectories), defaulting to project.build.resources, but customizable? And as not sure how that would allow to add "./pom.xml", so maybe also... resourceExtraFiles? There's probably be a better way to achieve what we're after?

Would a contribution with something like this be welcome?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)