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

Do not process files more than once #342

Open
iofik opened this issue Jun 27, 2019 · 1 comment
Open

Do not process files more than once #342

iofik opened this issue Jun 27, 2019 · 1 comment

Comments

@iofik
Copy link

iofik commented Jun 27, 2019

Hello Scalastyle team!
I have a small, but annoying problem with Scalastyle and SBT plugin.
We use Play framework and what it does by default is setting javaSource and scalaSource SBT variables to the same value ${baseDirectory}/app, which results in unmanagedSourceDirectories and consequently scalastyleSources having this value duplicated. This leads to each file in our Play projects being processed twice. Not only this take additional time, but also results in duplicate error/warning messages in the Scalastyle output.
This can be fixed in multiple places: workaround in our projects, fix to scalastyle-sbt-plugin, and also here in Scalastyle itself. We can make Directory.getFiles method return only unique files (or add corresponding option).
I can create the patch myself, just wanted to get your opinion on where this should be fixed.

michih57 added a commit to michih57/scalastyle that referenced this issue Feb 5, 2020
- see scalastyle#342 for the
original bug
- Directory.getFiles now filters out duplicates, returning unique files
@mwz
Copy link

mwz commented Feb 7, 2020

Fixed and released here.

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