Closed josephearl closed 8 years ago
Regarding the TODO, resouces in Compile
may be what you want. It will give you a Seq[File]
listing all the resource files from the build. This wouldn't cover resources files that are contained in one of the dependency JARs though. Something like http://stackoverflow.com/a/29580046/4893584 is the way to get a class loader to load those.
This looks good - do you want to add loading the config file from the classpath in this PR or a separate one?
@ajsquared I will try adding the resources into this PR using the link you just posted
Updated to support loading from the class path
I should add a test for the class path functionality that includes a jar as a dependency that has a checkstyle config in and make sure I can access that
Added test and updated README
This PR would change checkstyleConfig
setting from File
to CheckstyleConfig
which would break existing clients.
One option is to revert checkstyleConfig
to File
and expose the new behaviour through checkstyleConfigLocation
. If checkstyleConfigLocation
is not set then use the checkstyleConfig
value.
Another option is to use some major version change to signify the break.
Added a commit that goes with the first option and exposes the new behaviour through checkstyleConfigLocation
.
With all the changes you've made I was planning to have a major version release, so I'm okay with having the breaking change. It looks like you've already made a change to keep it compatible though, so that's good too.
Thanks again for all your work on these features. These have been great improvements and I really appreciate the time you've spent on them!
Fixes #13. Classpath loading TODO - any ideas for finding a file in the class path, I couldn't see anything built into sbt? (
dependencyClasspath in Compile).value returns
Seq[Attributed[File]]`