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 check test source set with configuration for main when testConfigLocation is defined #48

Open
lunaticare opened this issue Nov 8, 2018 · 0 comments

Comments

@lunaticare
Copy link

When I use the following configuration:

scalaStyle {
    configLocation = "scalastyle-config_main.xml"
    testConfigLocation = "scalastyle-config_test.xml"
    includeTestSourceDirectory = true
    source = "src/main/scala"
    testSource = "src/test/scala"
}

, the test source set is checked twice with configLocation and testConfigLocation configurations, resulting in unnecessary warnings for test source set since the rules for test source set are less strict in my case.
If I set includeTestSourceDirectory to false, code is checked as expected, the main source set with configLocation config and the test source set with testConfigLocation config.

I suggest that:

  • either documentation should say that includeTestSourceDirectory = true uses configLocation configuration;
  • or fix the plugin so includeTestSourceDirectory = true uses testConfigLocation if defined, configLocation otherwise.
@lunaticare lunaticare changed the title Do not check test source set with configuration for main when testConfig location is defined Do not check test source set with configuration for main when testConfigLocation is defined Nov 8, 2018
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

1 participant