scalastyle-maven-plugin travis-ci

Maven plugin for Scalastyle

3 years after

maven-scalastyle-plugin

Welcome to maven-scalastyle-plugin. This project is intended to provide maven plugin support for Scalastyle. For more information about Scalastyle, see https://github.com/scalastyle/scalastyle

Goals Overview

  • scalastyle:check performs a violation check against the scalastyle config file to see if there are any violations. It counts the number of violations found and displays it on the console if verbose is enabled.

Usage

Check scalacheck violation part of build cycle

To Configure the Scalastyle Plugin, you need to the add it in the section of your pom.xml as shown in the sample below, and by default the build will fail if there are any violations of level error found. Default phase of execution is verify. The following is an example of a configuration which would be used in a pom:

    <build>
        <plugins> 
          ...
          <plugin>
            <groupId>org.scalastyle</groupId>
            <artifactId>scalastyle-maven-plugin</artifactId>
            <version>0.8.0</version>
            <configuration>
              <verbose>false</verbose>
              <failOnViolation>true</failOnViolation>
              <includeTestSourceDirectory>true</includeTestSourceDirectory>
              <failOnWarning>false</failOnWarning>
              <sourceDirectory>${project.basedir}/src/main/scala</sourceDirectory>
              <testSourceDirectory>${project.basedir}/src/test/scala</testSourceDirectory>
              <configLocation>${project.basedir}/lib/scalastyle_config.xml</configLocation>
              <outputFile>${project.basedir}/scalastyle-output.xml</outputFile>
              <outputEncoding>UTF-8</outputEncoding>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          ...
        </plugins>
    </build>

You can also specify multiple source directories if necessary. Replace the element with :

    <sourceDirectories>
      <dir>${project.basedir}/src/main/scala</dir>
      <dir>${project.basedir}/src/main/generated-scala</dir>
    </sourceDirectories>

and similarly for testSourceDirectory & testSourceDirectories.

Related Repositories

awesome-scala

awesome-scala

A community driven list of useful Scala libraries, frameworks and software. ...

links

links

Just a bunch of useful links ...

linter

linter

Static Analysis Compiler Plugin for Scala ...

scapegoat

scapegoat

Scala compiler plugin for static code analysis ...

archery

archery

2D R-Tree implementation in Scala ...


Top Contributors

matthewfarwell dasbh adamsiemion BertrandDechoux joschi sschaef

Releases

-   v0.8.0 zip tar
-   v0.7.0 zip tar
-   v0.6.0 zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar
-   scalastyle-maven-plu zip tar