New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportControl: allow to load files from resources #3450
Comments
I will implement this. |
Should the resource loading be like the way it is done in for example SuppressionFilter? |
yes, by URI (web, filesystem, classpath) - https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/ConfigurationLoader.java#L177 |
Shall I make a separate property <module name="ImportControl">
<property name="resource" value="/my/package/import-control.xml"/>
</module> Or shall I use the <module name="ImportControl">
<!-- File my/package/import-control.xml not found, so interpreted as resource in classpath -->
<property name="file" value="/my/package/import-control.xml"/>
</module> BTW, the file you link loads Checkstyle's main configuration, but the checks seem to use their own implementation which also extends When CommonUtils.getUriByFilename() is used, it tries to load as a file, URL or resource, so implementing it this way would be easiest but inconsistent with having separate properties We could unite those into a single property but that would be a backwards incompatible change. Tell me what you think. For now I have started implementing this using a new |
it is legacy. It exists only because we can not easily remove property without breaking backward compatibility. That is why we wait for major release to do this. Please create separate issue on this , i will put "checkstyle8" label on it. |
OK. I will change the implementation of the I will create a separate issue for removing the |
to mark as deprecated please do by separate issue to explain the reason and prove that certain property is odd. Our releasenotes have links to issues, there all details should be. |
…rom URLs and classpath
…rom URLs and classpath
…rom URLs and classpath
fix is merged. |
base on #3358
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: