Skip to content

Commit

Permalink
Update UnmooredDocComment.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k authored Jan 17, 2025
1 parent 4702f95 commit 57e847e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions rules/src/main/scala/fix/UnmooredDocComment.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,12 @@ class UnmooredDocComment extends SyntacticRule("UnmooredDocComment") {
Patch.lint(
Diagnostic(
id = "",
message = s"unmoored doc comment for `${treeName(tree)}`",
message = s"unmoored doc comment for `${tree.productPrefix}`",
position = comment.pos,
severity = LintSeverity.Warning
)
)
}
.asPatch
}

private def treeName(t: Tree): String = {
t match {
case x: scala.Product =>
x.productPrefix
case _ =>
t.getClass.getName
}
}
}

0 comments on commit 57e847e

Please sign in to comment.