#591 Dupe of Allow remote references to additional file configura


I am unable to submit my patch to the original feature request, so I'm creating a new feature request and attaching my patch.

Original description:
When the Checkstyle configuration is defined as a Remote Configuration File over HTTP, for example with the Eclipse Checkstyle plugin, it cannot use a
SuppressionFilter file remotely. (The suppressions.xml file).

This appears to be due to the way that Checkstyle looks up the external SuppressionFilter file with a Java File object.

Allowing the Checkstyle configuration to be published on HTTP would be a great benefit to teams using a standard Checkstyle configuration. However, remote publishing would require that all additional files have a URL location, somewhat like an HTML page.

See comment on item raised earlier for Eclipse Checkstyle plugin https://sourceforge.net/tracker/?func=detail&atid=559494&aid=2018081&group_id=80344

My update:
I've attached a patch with unit tests which implements this functionality. I want it both for the eclipse plugin for checkstyle and also for the maven plugin. We require javadoc on all production methods, but we want to exclude unit tests from that requirement. Since I want there to be one corporate checkstyle file, I have it reference a url for the suppression filter.
I have tested this patch and it does work without breaking the other unit tests or backward compatibility.
The check is that if the file name starts with "http" and it cannot find the file, then it tries to open a URL. The ideal implementation of this would be to open a URL initially, but that would require existing code to change to put the file:// protocol handler in the filename. Since I didn't want to break backward compatibility I chose this route instead.
If you're willing to break backward compatibility then I like how e.g. spring framework references files in the the classpath with the classpath: prefix. You might want to consider that.
Anyway, attached is my patch for your consideration.


  • Stephen

    Stephen - 2012-02-07

    Patch which implements my feature request.

  • Oliver Burn

    Oliver Burn - 2012-02-09

    thanks - applied changeset 431cd7fef670


Log in to post a comment.