Open
Description
Compiler version
3.7
Minimized code
scala-cli compile --server=false -S 3.7.0-RC4 -Wconf:help huh.scala
Configure compiler warnings.
Syntax: -Wconf:<filters>:<action>,<filters>:<action>,...
multiple <filters> are combined with &, i.e., <filter>&...&<filter>
<filter>
- Any message: any
- Message categories: cat=deprecation, cat=feature, cat=unchecked
- Message content: msg=regex
The regex need only match some part of the message, not all of it.
- Message id: id=E129
The message id is printed with the warning.
- Message name: name=PureExpressionInStatementPosition
The message name is printed with the warning in verbose warning mode.
- Source location: src=regex
The regex is evaluated against the full source path.
- Origin of warning: origin=regex
The regex must match the full name (`package.Class.method`) of the deprecated entity.
In verbose warning mode the compiler prints matching filters for warnings.
Verbose mode can be enabled globally using `-Wconf:any:verbose`, or locally
using the @nowarn annotation (example: `@nowarn("v") def test = try 1`).
<action>
- error / e
- warning / w
- verbose / v (emit warning, show additional help for writing `-Wconf` filters)
- info / i (infos are not counted as warnings and not affected by `-Werror`)
- silent / s
The default configuration is empty.
User-defined configurations are added to the left. The leftmost rule matching
a warning message defines the action.
Examples:
- change every warning into an error: -Wconf:any:error
- silence deprecations: -Wconf:cat=deprecation:s
- silence a deprecation: -Wconf:origin=java\.lang\.Thread\.getId:s
- silence warnings in src_managed directory: -Wconf:src=src_managed/.*:s
Note: on the command-line you might need to quote configurations containing `*` or `&`
to prevent the shell from expanding patterns.
Expectation
Especially since the syntax does not quite align with Scala 2, it would be nice to have a reference page (if not for all compiler options).