Search code examples
f#lintionide

How to turn off Ionide Lint warnings


I have written a F# script in FSI using Ionide in VS Code. It's a great tool, but I am getting a warning from Ionide Lint suggesting a code improvement:

'Lint: Seq.map f (Seq.map g x) might be able to be refactored into Seq.map (g >> f) x.'

I have about 6 Seq.map functions all piped together with |> which I am happy with.

There is also a green wiggly line that is annoying me. I don't agree with the suggestion, and want the wiggly line to go away. How can I tell Ionide to stop making this suggestion?


Solution

  • I have turned off Lint globally in the VS Code settings

    "FSharp.linter": false,
    

    I think Ionide uses FsharpLint: http://fsprojects.github.io/FSharpLint/

    This supports suppressing of lint messages like this:

    [<SuppressMessage("NameConventions", "InterfaceNamesMustBeginWithI")>]
    type Printable =
        abstract member Print : unit -> unit
    

    Something like that might work for you as well. I just turned it off.