Skip to content

Commit

Permalink
Merge PR #666 from knocte/urlsInSuggestions
Browse files Browse the repository at this point in the history
Console: show URL for the rule at summary.
  • Loading branch information
knocte authored Jan 13, 2024
2 parents b69b24b + 424b8c3 commit 6870fcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/FSharpLint.Console/Output.fs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ type StandardOutput () =
member __.WriteInfo (info:string) = writeLine info ConsoleColor.White Console.Out
member this.WriteWarning (warning:Suggestion.LintWarning) =
let highlightedErrorText = highlightErrorText warning.Details.Range warning.ErrorText
let ruleUrlHint = sprintf "See https://fsprojects.github.io/FSharpLint/how-tos/rules/%s.html" warning.RuleIdentifier
let str = warning.Details.Message + Environment.NewLine + highlightedErrorText
+ Environment.NewLine + ruleUrlHint
writeLine str ConsoleColor.Yellow Console.Out
String.replicate 80 "-" |> (this :> IOutput).WriteInfo
member __.WriteError (error:string) = writeLine error ConsoleColor.Red Console.Error
Expand Down

0 comments on commit 6870fcd

Please sign in to comment.