GithubHelp home page GithubHelp logo

codemettle / mvn_scalafmt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonjpegg/mvn_scalafmt

0.0 1.0 0.0 77 KB

Scalafmt plugin for maven

License: Apache License 2.0

Shell 2.77% Java 22.43% Scala 74.80%

mvn_scalafmt's Introduction

licenseimg Codacy Build Status

releasebadge Maven

Synopsis

A wrapper that allows the use of the Scalafmt formatter in Maven.

Versioning

The versioning of this plugin follows the following format:

<artifactId>mvn-scalafmt_${scala.version}</artifactId>
<version>${plugin-version}-${scalafmt-version}</version>

Current supported versions (of Scalafmt) are 1.1.0 - 1.5.1. For example, to use the latest version of the plugin with the latest version of scala-fmt you should set the version to 0.10_1.5.1 in your pom. Note scala.version refers to binary versions of scala i.e. 2.11 or 2.12.

Usage

Add the following snippet to your pom; anything in <parameters> will be passed through to the CLI as is.

<plugin>
  <groupId>org.antipathy</groupId>
  <artifactId>mvn-scalafmt_${scala.version}</artifactId>
  <version>0.10_${scalafmt.version}</version>
  <configuration>
    <parameters>--diff</parameters> <!-- (Optional) Additional command line arguments -->
    <skip>false</skip> <!-- (Optional) skip formatting -->
    <skiptest>false</skiptest> <!-- (Optional) Skip formatting test sources -->
    <skipmain>false</skipmain> <!-- (Optional) Skip formatting main sources -->
    <configLocation>${project.basedir}/path/to/scalafmt.conf</configLocation> <!-- (Optional) config location -->
    <configRequired>false</configRequired><!-- (Optional) raise an error if configLocation is missing or invalid (otherwise use Scalafmt defaults) -->
    <sourceDirectories> <!-- (Optional) Paths to source-directories. Overrides ${project.build.sourceDirectory} -->
      <param>${project.basedir}/src/main/scala</param>
    </sourceDirectories>
    <testSourceDirectories> <!-- (Optional) Paths to test-source-directories. Overrides ${project.build.testSourceDirectory} -->
      <param>${project.basedir}/src/test/scala</param>
    </testSourceDirectories>
  </configuration>
  <executions>
    <execution>
      <phase>validate</phase>
      <goals>
        <goal>format</goal>
      </goals>
    </execution>
  </executions>
</plugin>

mvn_scalafmt's People

Contributors

simonjpegg avatar jbkt avatar jozic avatar evis avatar joan38 avatar mineo avatar cmontagnon avatar thisfred avatar jarmoni avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.