zzarchive-VisualFSharpPowerTools icon indicating copy to clipboard operation
zzarchive-VisualFSharpPowerTools copied to clipboard

Linter confused by active pattern

Open tpetricek opened this issue 9 years ago • 3 comments

I'm not suggesting anybody should actually write this sort of code :-), but:

lint

The F# compiler warning ("Incomplete pattern matches ...") makes sense and that's fine.

But the linter warning which says "Expected a camel case identifier, found 'None'." is wrong, because the None appears in a location where a pattern is expected - and so it is not a variable but a reference to standard None DU case.

tpetricek avatar Nov 11 '15 22:11 tpetricek

@vasily-kirichenko @dungpa is it possible for the linter to be able to use the typed AST or will that be too much of a performance killer? At the moment there are a few cases that require knowledge of the types for an accurate hint

duckmatt avatar Nov 11 '15 22:11 duckmatt

Yes, we can easily pass typed ast to it, but the linter tags will be updating with longer delay during code editing (same as colorization).

vasily-kirichenko avatar Nov 12 '15 05:11 vasily-kirichenko

Once I've finished the current bugs and performance upgrades I'm currently working on I'll try to take a look at at least making it optional to type check - perhaps returning an observable list so the hints are updated as the lint progresses, and see how that performs

duckmatt avatar Nov 12 '15 18:11 duckmatt