Skip to content

Commit aeaacf8

Browse files
author
Som Snytt
committed
Adjust help text
1 parent ec5b54f commit aeaacf8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/compiler/scala/tools/nsc/Reporting.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ object Reporting {
522522
def includes(o: WarningCategory): Boolean = this eq o
523523
def summaryCategory: WarningCategory = this
524524
lazy val name: String = WarningCategory.nameOf(this)
525+
override def toString = name
525526
}
526527

527528
object WarningCategory {
@@ -722,7 +723,7 @@ object Reporting {
722723
}
723724

724725
object MessageFilter {
725-
object Any extends MessageFilter {
726+
case object Any extends MessageFilter {
726727
def matches(message: Message): Boolean = true
727728
}
728729

@@ -768,7 +769,9 @@ object Reporting {
768769
}
769770
}
770771

771-
sealed trait Action
772+
sealed trait Action {
773+
override def toString = s"Action[${getClass.getSimpleName.stripSuffix("$")}]"
774+
}
772775

773776
object Action {
774777
object Error extends Action

src/compiler/scala/tools/nsc/settings/Warnings.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ trait Warnings {
8282
|The default configuration is:
8383
| -Wconf:${WconfDefault.mkString(",")}
8484
|
85-
|User-defined configurations are added to the left. The leftmost rule matching
86-
|a warning message defines the action.
85+
|Under -Xsource:3-cross, the category of scala3-migration warnings are errors by default:
86+
| -Wconf:cat=scala3-migration:e
87+
|Under -Xsource:3-migration, they are warnings:
88+
| -Wconf:cat=scala3-migration:w
89+
|
90+
|User-defined configurations override previous settings, such that the last matching
91+
|configuration defines the action for a given diagnostic message.
8792
|
8893
|Examples:
8994
| - change every warning into an error: -Wconf:any:error

0 commit comments

Comments
 (0)