Skip to content
This repository was archived by the owner on Oct 8, 2020. It is now read-only.

Commit a16a294

Browse files
committed
Add Scala-style plugin and config
1 parent 984c4d4 commit a16a294

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ project/plugins/project/
2121
*.iml
2222

2323
deptree.txt
24+
scalastyle-output.xml
2425

pom.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<hadoop.version>2.8.3</hadoop.version>
6464
<jena.version>3.7.0</jena.version>
6565
<sansa.version>0.4.1-SNAPSHOT</sansa.version>
66+
<scalastyle.config.path>${project.basedir}/scalastyle-config.xml</scalastyle.config.path>
6667
</properties>
6768

6869
<dependencyManagement>
@@ -295,6 +296,32 @@
295296
<version>2.19.1</version>
296297
</plugin>
297298

299+
<!-- Scalastyle -->
300+
<plugin>
301+
<groupId>org.scalastyle</groupId>
302+
<artifactId>scalastyle-maven-plugin</artifactId>
303+
<version>1.0.0</version>
304+
<configuration>
305+
<verbose>false</verbose>
306+
<failOnViolation>true</failOnViolation>
307+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
308+
<failOnWarning>false</failOnWarning>
309+
<sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
310+
<testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>
311+
<!-- we use a central config located in the root directory -->
312+
<configLocation>${scalastyle.config.path}</configLocation>
313+
<outputFile>${project.basedir}/scalastyle-output.xml</outputFile>
314+
<outputEncoding>UTF-8</outputEncoding>
315+
</configuration>
316+
<executions>
317+
<execution>
318+
<goals>
319+
<goal>check</goal>
320+
</goals>
321+
</execution>
322+
</executions>
323+
</plugin>
324+
298325
<!-- Scalatest -->
299326
<plugin>
300327
<groupId>org.scalatest</groupId>
@@ -318,6 +345,20 @@
318345
</pluginManagement>
319346
</build>
320347

348+
<profiles>
349+
<profile>
350+
<id>root-dir</id>
351+
<activation>
352+
<file>
353+
<exists>${project.basedir}/../../scalastyle-config.xml</exists>
354+
</file>
355+
</activation>
356+
<properties>
357+
<scalastyle.config.path>${project.basedir}/../scalastyle-config.xml</scalastyle.config.path>
358+
</properties>
359+
</profile>
360+
</profiles>
361+
321362
<repositories>
322363
<repository>
323364
<id>oss-sonatype</id>

sansa-examples-flink/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@
197197
</execution>
198198
</executions>
199199
</plugin>
200+
<plugin>
201+
<groupId>org.scalastyle</groupId>
202+
<artifactId>scalastyle-maven-plugin</artifactId>
203+
</plugin>
200204
</plugins>
201205
</build>
202206

sansa-examples-spark/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@
352352
</execution>
353353
</executions>
354354
</plugin>
355+
<plugin>
356+
<groupId>org.scalastyle</groupId>
357+
<artifactId>scalastyle-maven-plugin</artifactId>
358+
</plugin>
355359
</plugins>
356360
</build>
357361

0 commit comments

Comments
 (0)