You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2018/02/10 16:36:00 UTC

[jira] [Resolved] (SPARK-23374) Checkstyle/Scalastyle only work from top level build

     [ https://issues.apache.org/jira/browse/SPARK-23374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Owen resolved SPARK-23374.
-------------------------------
    Resolution: Not A Problem

Agree, that's the right way to invoke a target on one module in a multi-module project

> 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
(v7.6.3#76005)

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