logo Scalastyle Maven Plugin

Integrates Scalastyle style checker for Scala with maven

homepage: www.scalastyle.org
fresh index:
last release: 4 years ago, first release: 9 years ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
scalastyle:help

Display help information on scalastyle-maven-plugin. Call mvn scalastyle:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

scalastyle:check (phase: verify)

Entry point for scalastyle maven plugin.

Often used code snippets:

<plugin>
  <groupId>org.scalastyle</groupId>
  <artifactId>scalastyle-maven-plugin</artifactId>
  <version>0.8.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>${basedir}/target/scalastyle-output.xml</outputFile>
    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</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>
      <phase>package</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.scalastyle</groupId>
  <artifactId>scalastyle-maven-plugin</artifactId>
  <version>1.0.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>${basedir}/target/scalastyle-output.xml</outputFile>
    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.scalastyle</groupId>
  <artifactId>scalastyle-maven-plugin</artifactId>
  <version>0.7.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>${basedir}/target/scalastyle-output.xml</outputFile>
    <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
    <outputEncoding>${project.reporting.outputEncoding}</outputEncoding>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.