Skip to content

tashoyan/scalariform-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central

Main

Scalariform Maven plugin

Maven plugin for Scalariform, a Scala code formatter.

Usage

Add a section like below in your POM-file:

<plugins>
  <plugin>
    <groupId>com.github.tashoyan</groupId>
    <artifactId>scalariform-maven-plugin</artifactId>
    <version>0.2.3</version>
    <configuration>
      <firstArgumentOnNewline>Force</firstArgumentOnNewline>
      <firstParameterOnNewline>Force</firstParameterOnNewline>
      <allowParamGroupsOnNewlines>true</allowParamGroupsOnNewlines>
      <danglingCloseParenthesis>Force</danglingCloseParenthesis>
      <doubleIndentConstructorArguments>true</doubleIndentConstructorArguments>
      <doubleIndentMethodDeclaration>true</doubleIndentMethodDeclaration>
      <newlineAtEndOfFile>true</newlineAtEndOfFile>
      <placeScaladocAsterisksBeneathSecondAsterisk>true</placeScaladocAsterisksBeneathSecondAsterisk>
      <singleCasePatternOnNewline>false</singleCasePatternOnNewline>
      <spacesAroundMultiImports>false</spacesAroundMultiImports>
    </configuration>
  </plugin>
  ...
</plugins>

The plugin has just one goal: format, by default it is bound to process-sources lifecycle phase.

Settings

Name Default value Description
sourceDirectory src/main/scala Directory with Scala sources
testSourceDirectory src/test/scala Directory with Scala test sources

For Scalariform settings, see Scalariform web page.

License

MIT License

Credits

Forked from Matt Russell's repo and updated to support Scalariform 0.2.x as well as Maven 3 API.

Originally contributed to Scalariform by Adam Crain.

About

Maven plugin for Scalariform, a Scala code formatter

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 62.7%
  • Scala 37.3%