scalastyle-sbt-plugin icon indicating copy to clipboard operation
scalastyle-sbt-plugin copied to clipboard

scalastyleSources setting does not support individual files

Open scf37 opened this issue 9 years ago • 2 comments

In theory, files could be excluded using following construct: scalastyleSources := scalastyleSources in dao.value .map(PathFinder.apply _) .reduceLeft[PathFinder]((a, b) => a +++ b) .**("*") .filter( ! _.getAbsolutePath.contains("src/main/scala/my/generated/metadata")).get

but - scalastyle seems to take entire parent directory instead of single file passed in.

scf37 avatar Aug 11 '16 13:08 scf37

Looking at the code, it should just use the file directly, if it ends with .scala. Can you give me more information on the error please?

matthewfarwell avatar Apr 21 '17 17:04 matthewfarwell

Hi! Good to know it is alive after all those months :-)

I do not remember exactly what the problem is but I think that scalastyle does not work with filenames in scalastyleSources, only directory names. E.g. if you have two .scala files in a directory, you can't ignore one of them using scalastyleSources.

scf37 avatar Apr 21 '17 19:04 scf37