Sean Owen updated SPARK-23374:
      Priority: Trivial  (was: Minor)
    Issue Type: Improvement  (was: Bug)

This isn't a bug; it's how it's supposed to work, as it's there for Jenkins 
jobs. If you can suggest a clean change that makes it more flexible, sure, but 
otherwise I'd close this.

> Checkstyle/Scalastyle only work from top level build
> ----------------------------------------------------
>                 Key: SPARK-23374
>                 URL: https://issues.apache.org/jira/browse/SPARK-23374
>             Project: Spark
>          Issue Type: Improvement
>          Components: Build
>    Affects Versions: 2.2.1
>            Reporter: Rob Vesse
>            Priority: Trivial
> The current Maven plugin definitions for Checkstyle/Scalastyle use fixed XML 
> configs for the style rule locations that are only valid relative to the top 
> level POM.  Therefore if you try and do a {{mvn verify}} in an individual 
> module you get the following error:
> {noformat}
> [ERROR] Failed to execute goal 
> org.scalastyle:scalastyle-maven-plugin:1.0.0:check (default) on project 
> spark-mesos_2.11: Failed during scalastyle execution: Unable to find 
> configuration file at location scalastyle-config.xml
> {noformat}
> As the paths are hardcoded in XML and don't use Maven properties you can't 
> override these settings so you can't style check a single module which makes 
> doing style checking require a full project {{mvn verify}} which is not ideal.
> By introducing Maven properties for these two paths it would become possible 
> to run checks on a single module like so:
> {noformat}
> mvn verify -Dscalastyle.location=../scalastyle-config.xml
> {noformat}
> Obviously the override would need to vary depending on the specific module 
> you are trying to run it against but this would be a relatively simply change 
> that would streamline dev workflows

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to