@@ -34,8 +34,10 @@ object ScalacOptions {
34
34
Set (" -V" , " -W" , " -X" , " -Y" )
35
35
private val scalacOptionsPrefixes =
36
36
Set (" -g" , " -language" , " -opt" , " -P" , " -target" ) ++ scalacOptionsPurePrefixes
37
- private val scalacAliasedOptions = // these options don't require being passed after -O
38
- Set (" -encoding" , " -release" )
37
+ private val scalacAliasedOptions = // these options don't require being passed after -O and accept an arg
38
+ Set (" -encoding" , " -release" , " -color" )
39
+ private val scalacNoArgAliasedOptions = // these options don't require being passed after -O and don't accept an arg
40
+ Set (" -nowarn" , " -feature" , " -deprecation" )
39
41
40
42
/** This includes all the scalac options which disregard inputs and print a help and/or context
41
43
* message instead.
@@ -67,6 +69,8 @@ object ScalacOptions {
67
69
args match {
68
70
case h :: t if scalacOptionsPrefixes.exists(h.startsWith) =>
69
71
Right (Some ((Some (h :: acc.getOrElse(Nil )), t)))
72
+ case h :: t if scalacNoArgAliasedOptions.contains(h) =>
73
+ Right (Some ((Some (h :: acc.getOrElse(Nil )), t)))
70
74
case h :: t if scalacAliasedOptions.contains(h) =>
71
75
// check if the next scalac arg is a different option or a param to the current option
72
76
val maybeOptionArg = t.headOption.filter(! _.startsWith(" -" ))
0 commit comments