maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MCHECKSTYLE-328) Intro. new config. property to add additional resources
Date Mon, 25 Jul 2016 21:43:20 GMT

     [ https://issues.apache.org/jira/browse/MCHECKSTYLE-328?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Vorburger updated MCHECKSTYLE-328:
------------------------------------------
    Description: 
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 which double
star would - 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?

  was:
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?


> 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 which
double star would - 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)

Mime
View raw message