Github user rahulsinghaliitd commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1550#discussion_r15387188
  
    --- Diff: pom.xml ---
    @@ -957,6 +957,30 @@
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-source-plugin</artifactId>
           </plugin>
    +      <plugin>
    +        <groupId>org.scalastyle</groupId>
    +        <artifactId>scalastyle-maven-plugin</artifactId>
    +        <version>0.4.0</version>
    +        <configuration>
    +          <verbose>false</verbose>
    +          <failOnViolation>true</failOnViolation>
    +          <includeTestSourceDirectory>false</includeTestSourceDirectory>
    +          <failOnWarning>false</failOnWarning>
    +          <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
    +          
<testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
    +          <configLocation>scalastyle-config.xml</configLocation>
    +          <outputFile>scalastyle-output.xml</outputFile>
    +          <outputEncoding>UTF-8</outputEncoding>
    +        </configuration>
    +        <executions>
    +          <execution>
    --- End diff --
    
    Yes, `mvn package` is supposed to run these checks. I am surprised to hear 
that it didn't work for you. I had updated the PR yesterday, do by chance 
happen to have the older version (it was missing the line 
`<phase>package</phase>`)? Here is the snippet from my machine:
    
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ spark-core_2.10 ---
    [INFO] Building jar: 
/mnt/devel/rahuls/code/apache-spark/core/target/spark-core_2.10-1.1.0-SNAPSHOT.jar
    [INFO] 
    [INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ 
spark-core_2.10 ---
    [INFO] 
    [INFO] --- maven-source-plugin:2.2.1:jar-no-fork (create-source-jar) @ 
spark-core_2.10 ---
    [INFO] Building jar: 
/mnt/devel/rahuls/code/apache-spark/core/target/spark-core_2.10-1.1.0-SNAPSHOT-sources.jar
    [INFO] 
    [INFO] --- scalastyle-maven-plugin:0.4.0:check (default) @ spark-core_2.10 
---
    Saving to 
outputFile=/mnt/devel/rahuls/code/apache-spark/core/scalastyle-output.xml
    Processed 361 file(s)
    Found 0 errors
    Found 0 warnings
    Found 0 infos
    Finished in 8234 ms
    
    Another way to run these checks is through `mvn scalastyle:check` but that 
requires the inter-module dependencies are satisfied via M2 repo.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to