@@ -171,18 +171,24 @@ private sealed trait WarningSettings:
171171 name = " imports" ,
172172 description = " Warn if an import selector is not referenced.\n " +
173173 " NOTE : overrided by -Wunused:strict-no-implicit-warn" ),
174- ChoiceWithHelp (" patvars" ," Warn if a variable bound in a pattern is unused" ),
175- ChoiceWithHelp (" privates" ," Warn if a private member is unused" ),
176- ChoiceWithHelp (" locals" ," Warn if a local definition is unused" ),
177- ChoiceWithHelp (" explicits" ," Warn if an explicit parameter is unused" ),
178- ChoiceWithHelp (" implicits" ," Warn if an implicit parameter is unused" ),
179- ChoiceWithHelp (" params" ," Enable -Wunused:explicits,implicits" ),
180- ChoiceWithHelp (" linted" ," Enable -Wunused:imports,privates,locals,implicits" ),
181- ChoiceWithHelp (
182- name = " strict-no-implicit-warn" ,
183- description = " Same as -Wunused:import, only for imports of explicit named members.\n " +
184- " NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all"
185- )
174+ ChoiceWithHelp (" privates" ," Warn if a private member is unused" ),
175+ ChoiceWithHelp (" locals" ," Warn if a local definition is unused" ),
176+ ChoiceWithHelp (" explicits" ," Warn if an explicit parameter is unused" ),
177+ ChoiceWithHelp (" implicits" ," Warn if an implicit parameter is unused" ),
178+ ChoiceWithHelp (" params" ," Enable -Wunused:explicits,implicits" ),
179+ ChoiceWithHelp (" linted" ," Enable -Wunused:imports,privates,locals,implicits" ),
180+ ChoiceWithHelp (
181+ name = " strict-no-implicit-warn" ,
182+ description = " Same as -Wunused:import, only for imports of explicit named members.\n " +
183+ " NOTE : This overrides -Wunused:imports and NOT set by -Wunused:all"
184+ ),
185+ // ChoiceWithHelp("patvars","Warn if a variable bound in a pattern is unused"),
186+ ChoiceWithHelp (
187+ name = " unsafe-warn-patvars" ,
188+ description = " (UNSAFE) Warn if a variable bound in a pattern is unused.\n " +
189+ " This warning can generate false positive, as warning cannot be\n " +
190+ " suppressed yet."
191+ )
186192 ),
187193 default = Nil
188194 )
@@ -206,7 +212,8 @@ private sealed trait WarningSettings:
206212 def privates (using Context ) =
207213 allOr(" privates" ) || allOr(" linted" )
208214 def patvars (using Context ) =
209- allOr(" patvars" )
215+ isChoiceSet(" unsafe-warn-patvars" ) // not with "all"
216+ // allOr("patvars") // todo : rename once fixed
210217 def linted (using Context ) =
211218 allOr(" linted" )
212219 def strictNoImplicitWarn (using Context ) =
0 commit comments