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

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

Rob Vesse created SPARK-23374:
---------------------------------

             Summary: Checkstyle/Scalastyle only work from top level build
                 Key: SPARK-23374
                 URL: https://issues.apache.org/jira/browse/SPARK-23374
             Project: Spark
          Issue Type: Bug
          Components: Build
    Affects Versions: 2.2.1
            Reporter: Rob Vesse


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