sbt / sbt-nocomma   0.1.2

Apache License 2.0 GitHub

sbt-nocomma reduces commas from your build.sbt.

Scala versions: 3.x 2.12
sbt plugins: 2.0.0-M2 1.x

sbt-nocomma

CI Latest version

sbt-nocomma reduces commas from your build.sbt.

setup

sbt-nocomma is available for sbt 1.x. Put the following to project/plugins.sbt:

addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "x.y.z")

usage

This introduces nocomma { ... } macro that returns Vector[Setting[_]].

import Dependencies._

ThisBuild / organization := "com.example"
ThisBuild / scalaVersion := "3.0.1"
ThisBuild / version      := "0.1.0-SNAPSHOT"

lazy val root = (project in file("."))
  .settings(nocomma {

    name := "Hello"
    scalacOptions += "-Ykind-projector"

    // comment works
    libraryDependencies += scalaTest % Test
  })

Note the lack of commas at the end of each line.