[ checkstyle-Feature Requests-3485185 ] Dupe of Allow remote references to additional file configura

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ checkstyle-Feature Requests-3485185 ] Dupe of Allow remote references to additional file configura

SourceForge.net
Feature Requests item #3485185, was opened at 2012-02-06 20:05
Message generated for change (Comment added) made by oburn
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397081&aid=3485185&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core Framework
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Stephen (scooper)
>Assigned to: Oliver Burn (oburn)
Summary: Dupe of Allow remote references to additional file configura

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Oliver Burn (oburn)
Date: 2012-02-09 03:44

Message:
thanks - applied changeset 431cd7fef670

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397081&aid=3485185&group_id=29721

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Checkstyle-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel