softwaremill / neme-plugin   0.0.5

Apache License 2.0 GitHub

Scala compiler plugin for turning non exhaustive match warnings into errors

Scala versions: 2.13 2.12 2.11

neme - not exhaustive match error

Build Status Maven Central

Scala compiler plugin for turning non exhaustive match warnings into errors

This plugin is heavily inspired by silencer-plugin

Published for Scala 2.11, 2.12 and 2.13.

Deprecation notice

Since scala 2.13.2 there is a new flag - -Wconf which covers that functionality making this project obsolete. Later, it was also backported into 2.12.13 (https://github.com/scala/scala/releases/tag/v2.12.13).

See scala/scala#8373. The specific setting replicating the functionality of the plugin is:

scalacOptions += "-Wconf:cat=other-match-analysis:error"

Usage

If you're using SBT, simply add these lines to your build.sbt to enable the plugin:

libraryDependencies ++= Seq(
  compilerPlugin("com.softwaremill.neme" %% "neme-plugin" % "0.0.5")
)

Or in ~/.sbt/1.0/*.sbt:

addCompilerPlugin("com.softwaremill.neme" %% "neme-plugin" % "0.0.5")