#521 ability to load configs from classpath

Check (274)

Checks such as ImportControl require configuration from a separate file. However only file or url is offered to configure such reference.

In large projects checkstyle is used in many tools (eclipse, maven, code-qualitiy-analysis-tools, CI, etc.)
as well as by many users in various operating-systems and environments.

The ability to have a file reference (C:\Windows\Profiles... or /usr/local/...) is simply not acceptable in such case.
Further using an external URL (http://...) prevents usage in offline situations or requires to have a local
server. So this is also sort of useless.

The most obvious way to solve such references is using the java classpath. Maven and many other
tools have support for reading the main config from classpath. Then you can simply build a JAR file
containing all such configs.

So the suggestion is to offer a way to specify references on config-files located in the classpath.
An alternative approach is to allow to inline such config into the main checkstyle config.
However maintaining separate files for different aspects is generally a better idea.


  • Roman Ivanov

    Roman Ivanov - 2016-06-25
    • status: open --> closed
    • Group: --> Future

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks