Plugins for code quality - KnoldusLabs/codesquad-support GitHub Wiki

Plugins Required

You should add the following plugins to have a better code quality.

1. ScalaStyle

Add the following to plugin.sbt

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")

Command to generate the config file

sbt scalastyleGenerateConfig

To get scalastyle report

sbt scalastyle

2. Scapegoat

Add the following to plugin.sbt

addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.0.4")

The add the following to build.sbt

scapegoatVersion := "1.1.0"

To get scapegoat result, do -

sbt scapegoat

3. Scoverage

Add the following to plugin.sbt

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")

Run the tests using

sbt clean coverage test

Generate the report using

sbt coverageReport

4. Copy Paste Detector

Add the following to plugin.sbt

addSbtPlugin("de.johoop" % "cpd4sbt" % "1.1.5")

Add the following to build.sbt

import de.johoop.cpd4sbt.CopyPasteDetector._

cpdSettings

Generate report using

sbt cpd