You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/19 12:22:00 UTC

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

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

Elliotte Rusty Harold resolved MCHECKSTYLE-328.
-----------------------------------------------
    Resolution: Won't Fix

It's an interesting idea, but I can't see fitting this into the existing Maven architecture. Perhaps you could consider an enforcer rule instead?

> 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
>            Priority: Major
>
> 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
(v8.3.4#803005)