[
https://issues.apache.org/jira/browse/JCLOUDS-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olaf Flebbe updated JCLOUDS-1497:
---------------------------------
Description:
We need to include checkstyle-suppressions.xml into jclouds-resources.jar
Unfortunately this doesn't work. checkstyle-6.1.1 does load supressions from
the class path, but IMO incorrectly (see
https://github.com/checkstyle/checkstyle/blob/checkstyle-6.1.1/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java
)
{code}
// check to see if the file is in the classpath
try {
final URL configUrl = SuppressionsLoader.class
.getResource(aFilename);
if (configUrl == null) {
throw new FileNotFoundException(aFilename);
}
uri = configUrl.toURI();
{code}
This won't load stuff from jclouds-resources.jar on the classpath.
So we have only a limited number of options (beyond fixing checkstyle).
# Add resources/checkstyle-suppressions.xml to jclouds (having an ugly
dependency)
# Remove the check triggering the checkstyle problem.
The check triggering the problem where we need the suppressions is the "header"
module checking for the presence of the proper apache license header in each
java file. May I suggest to remove this check, since it is already covered by
the apache-rat tool anyway? (Problem arises because some autogenerated
transient code obviously does not include the ASF license header.
was:We need to include checkstyle-suppressions.xml into jclouds-resources.jar
> Fix jclouds-labs after JCLOUDS-1496
> -----------------------------------
>
> Key: JCLOUDS-1497
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1497
> Project: jclouds
> Issue Type: Task
> Reporter: Olaf Flebbe
> Priority: Major
>
> We need to include checkstyle-suppressions.xml into jclouds-resources.jar
> Unfortunately this doesn't work. checkstyle-6.1.1 does load supressions from
> the class path, but IMO incorrectly (see
> https://github.com/checkstyle/checkstyle/blob/checkstyle-6.1.1/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionsLoader.java
> )
> {code}
> // check to see if the file is in the classpath
> try {
> final URL configUrl = SuppressionsLoader.class
> .getResource(aFilename);
> if (configUrl == null) {
> throw new FileNotFoundException(aFilename);
> }
> uri = configUrl.toURI();
> {code}
> This won't load stuff from jclouds-resources.jar on the classpath.
> So we have only a limited number of options (beyond fixing checkstyle).
> # Add resources/checkstyle-suppressions.xml to jclouds (having an ugly
> dependency)
> # Remove the check triggering the checkstyle problem.
> The check triggering the problem where we need the suppressions is the
> "header" module checking for the presence of the proper apache license header
> in each java file. May I suggest to remove this check, since it is already
> covered by the apache-rat tool anyway? (Problem arises because some
> autogenerated transient code obviously does not include the ASF license
> header.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)