This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree 3 files changed +12
-5
lines changed
plugin-sbt/src/main/scala/com/softwaremill/clippy
3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ name := "clippy"
21
21
// factor out common settings into a sequence
22
22
lazy val commonSettingsNoScalaVersion = Seq (
23
23
organization := " com.softwaremill.clippy" ,
24
- version := " 0.6.0 " ,
24
+ version := " 0.6.1 " ,
25
25
scalacOptions ++= Seq (" -unchecked" , " -deprecation" ),
26
26
parallelExecution := false ,
27
27
// Sonatype OSS deployment
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ object ClippySbtPlugin extends AutoPlugin {
26
26
val None = Value (" none" )
27
27
}
28
28
29
+ object WarningPatterns {
30
+ val NonExhaustiveMatch = " match may not be exhaustive[\\ s\\ S]*"
31
+ }
32
+
29
33
object autoImport {
30
34
val clippyColorsEnabled = settingKey[Boolean ](" Should Clippy color type mismatch diffs and highlight syntax" )
31
35
val clippyColorDiff = settingKey[Option [ClippyColor .Value ]](" The color to use for diffs, if other than default" )
@@ -45,6 +49,7 @@ object ClippySbtPlugin extends AutoPlugin {
45
49
settingKey[Option [String ]](" Project root in which project-specific advice is stored, if any" )
46
50
val clippyFatalWarnings =
47
51
settingKey[List [String ]](" Regular expressions of warning messages which should fail compilation" )
52
+ val NonExhaustiveMatch = " match may not be exhaustive[\\ s\\ S]*"
48
53
}
49
54
50
55
// in ~/.sbt auto import doesn't work, so providing aliases here for convenience
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ <h2>Adding the plugin</h2>
29
29
</ p >
30
30
31
31
< pre >
32
- addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.6.0 ")
32
+ addSbtPlugin("com.softwaremill.clippy" % "plugin-sbt" % "0.6.1 ")
33
33
</ pre >
34
34
35
35
< p >
@@ -58,9 +58,11 @@ <h2>(NEW!) Turning selected compilation warnings into errors</h2>
58
58
use the < code > clippyFatalWarnings</ code > setting, for example:
59
59
</ p >
60
60
< pre >
61
+ import com.softwaremill.clippy.ClippySbtPlugin.WarningPatterns._
62
+ // ...
61
63
settings(
62
64
clippyFatalWarnings ++= List(
63
- "match may not be exhaustive[\\s\\S]*" ,
65
+ NonExhaustiveMatch ,
64
66
".*\\[wartremover:.*\\].*[\\s\\S]*"
65
67
)
66
68
)
@@ -175,15 +177,15 @@ <h2>Alternative ways to use Clippy</h2>
175
177
</ p >
176
178
177
179
< pre >
178
- addCompilerPlugin("com.softwaremill.clippy" %% "plugin" % "0.6.0 " classifier "bundle")
180
+ addCompilerPlugin("com.softwaremill.clippy" %% "plugin" % "0.6.1 " classifier "bundle")
179
181
</ pre >
180
182
181
183
< p >
182
184
If you are using < code > scalac</ code > directly, add the following option:
183
185
</ p >
184
186
185
187
< pre >
186
- -Xplugin:clippy-plugin_2.11-0.6.0 -bundle.jar
188
+ -Xplugin:clippy-plugin_2.11-0.6.1 -bundle.jar
187
189
</ pre >
188
190
189
191
< p >
You can’t perform that action at this time.
0 commit comments