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

Commit e4f3b4d

Browse files
Scalastyle plugin.
1 parent 0704953 commit e4f3b4d

File tree

2 files changed

+44
-24
lines changed

2 files changed

+44
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ project/plugins/project/
1717
.worksheet
1818
*.iml
1919
.idea
20+
21+
scalastyle-output.xml

pom.xml

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
<CodeCacheSize>512m</CodeCacheSize>
8383
<gpg.keyname>AKSW</gpg.keyname>
8484
<owlapi.version>5.1.3</owlapi.version>
85+
<scalastyle.config.path>${project.basedir}/scalastyle-config.xml</scalastyle.config.path>
8586
</properties>
8687

8788
<prerequisites>
@@ -520,30 +521,33 @@
520521
<groupId>com.versioneye</groupId>
521522
<artifactId>versioneye-maven-plugin</artifactId>
522523
</plugin>
523-
<!--<plugin>-->
524-
<!--<groupId>org.scalastyle</groupId>-->
525-
<!--<artifactId>scalastyle-maven-plugin</artifactId>-->
526-
<!--<version>0.8.0</version>-->
527-
<!--<configuration>-->
528-
<!--<verbose>false</verbose>-->
529-
<!--<failOnViolation>false</failOnViolation>-->
530-
<!--<includeTestSourceDirectory>false</includeTestSourceDirectory>-->
531-
<!--<failOnWarning>false</failOnWarning>-->
532-
<!--<sourceDirectory>${basedir}/src/main/scala</sourceDirectory>-->
533-
<!--<testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>-->
534-
<!--<configLocation>scalastyle-config.xml</configLocation>-->
535-
<!--<outputFile>${basedir}/target/scalastyle-output.xml</outputFile>-->
536-
<!--<inputEncoding>${project.build.sourceEncoding}</inputEncoding>-->
537-
<!--<outputEncoding>${project.reporting.outputEncoding}</outputEncoding>-->
538-
<!--</configuration>-->
539-
<!--<executions>-->
540-
<!--<execution>-->
541-
<!--<goals>-->
542-
<!--<goal>check</goal>-->
543-
<!--</goals>-->
544-
<!--</execution>-->
545-
<!--</executions>-->
546-
<!--</plugin>-->
524+
525+
<!-- Scalastyle -->
526+
<plugin>
527+
<groupId>org.scalastyle</groupId>
528+
<artifactId>scalastyle-maven-plugin</artifactId>
529+
<version>1.0.0</version>
530+
<configuration>
531+
<verbose>false</verbose>
532+
<failOnViolation>false</failOnViolation>
533+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
534+
<failOnWarning>false</failOnWarning>
535+
<sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
536+
<testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>
537+
<!-- we use a central config located in the root directory -->
538+
<configLocation>${scalastyle.config.path}</configLocation>
539+
<outputFile>${project.basedir}/scalastyle-output.xml</outputFile>
540+
<outputEncoding>UTF-8</outputEncoding>
541+
</configuration>
542+
<executions>
543+
<execution>
544+
<goals>
545+
<goal>check</goal>
546+
</goals>
547+
</execution>
548+
</executions>
549+
</plugin>
550+
547551
</plugins>
548552
</build>
549553

@@ -668,6 +672,7 @@
668672

669673
<!-- the profile used for deployment to Sonatype Maven repository -->
670674
<profile>
675+
<!-- for Maven Central deployment -->
671676
<id>ossrh</id>
672677
<distributionManagement>
673678
<repository>
@@ -786,5 +791,18 @@
786791
</plugins>
787792
</build>
788793
</profile>
794+
795+
<!-- for Scalastyle plugin -->
796+
<profile>
797+
<id>root-dir</id>
798+
<activation>
799+
<file>
800+
<exists>${project.basedir}/../../scalastyle-config.xml</exists>
801+
</file>
802+
</activation>
803+
<properties>
804+
<scalastyle.config.path>${project.basedir}/../scalastyle-config.xml</scalastyle.config.path>
805+
</properties>
806+
</profile>
789807
</profiles>
790808
</project>

0 commit comments

Comments
 (0)