Closed sheridanchris closed 9 months ago
Hi Chris,
Thank you for this suggestion! We like it and would be happy to receive a PR for this 🥳! Don't hesitate to ask any technical questions if you have any.
This sample could be of help for you to get started: https://github.com/ionide/FSharp.Analyzers.SDK/blob/master/samples/OptionAnalyzer/Library.fs
could / should there be something similar for ValueOption ?
Yeah, seems reasonable. Are you interested in submitting a PR?
Would probably be nothing more than adding an OR in if mfv.FullName = "Microsoft.FSharp.Core.Option.get" && args.Length = 1 then
I can have a go later if no one else gets to it first
I think we should have the Option.Value
analyzer from the SDK sample as well.
I think an analyzer for
Option.get
that promotes the graceful handling of theNone
case by using functions likeOption.defaultValue
or pattern matching should be added. I'd like to create a PR for this if you believe this is a useful addition.