Skip to content

Scala Configuration

moznion edited this page Apr 22, 2020 · 5 revisions

Scala formatter configuration.

Example

import net.moznion.sbt.spotless.config._

lazy val root = (project in file("."))
  .settings(
    name := "Example",
    spotlessScala := ScalaConfig(
      scalafmt = ScalafmtConfig(),
    ),
  )

Setting Key

spotlessScala: ScalaConfig

Description

This configuration accepts to embed Formatter Common Configuration.

Default target

*.scala files that are under the project source directory.

Items

scalafmt: ScalafmtConfig

Default Value: no value

The formatter configuration for Scalafmt.

Example

scalafmt = ScalafmtConfig(
  version = null,
  style = null,
)

Items

version: String

default value: depends on dependent Spotless version

The version of Scalafmt.

configFile: File

default value: empty

Configuration file for Scalafmt.