Skip to content

Commit

Permalink
Error: include doc url in SearchStateExploded msg
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 4, 2023
1 parent 4f2d8c6 commit 630322d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scalafmt-core/shared/src/main/scala/org/scalafmt/Error.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ object Error {

def reportIssue: String =
"Please file an issue on https://github.com/scalameta/scalafmt/issues"
val cfgUrl = "https://scalameta.org/scalafmt/docs/configuration.html"

case object UnableToParseCliOptions
extends Error("Failed to parse CLI options")

Expand Down Expand Up @@ -80,7 +82,8 @@ object Error {
) extends Error({
val tok = LoggerOps.log2(ft)
val line = ft.left.pos.endLine
s"Search state exploded on '$tok', line $line"
val frag = "#search-state-exploded"
s"Search state exploded on '$tok', line $line [see $cfgUrl$frag]"
}) {
def line: Int = ft.left.pos.endLine
}
Expand Down

0 comments on commit 630322d

Please sign in to comment.