Skip to content
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

Run ScalaStyle on a single file (one class/object) #328

Open
JohnReedLOL opened this issue Nov 15, 2018 · 1 comment
Open

Run ScalaStyle on a single file (one class/object) #328

JohnReedLOL opened this issue Nov 15, 2018 · 1 comment

Comments

@JohnReedLOL
Copy link

JohnReedLOL commented Nov 15, 2018

I am working on a horrible codebase and if I run ScalaStyle on it, the thing will blow up with thousands of warnings and errors. Is there a way for me to run ScalaStyle just on a single file in the codebase so that I can ignore all the issues from all the other files?

The file consists of a single Scala object or class.

@anilkumarmyla
Copy link

although undocumented, if you read the source code, there is a setting scalastyleSources which you can define in your build.sbt to only the file that you want to run on. Hope that solves your issue

ex:

scalastyleSources := Seq(new File("src/main/scala/path/to/File.scala"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants