FSharpLint
FSharpLint copied to clipboard
Add new rule FavourSingleton
Fixes https://github.com/fsprojects/FSharpLint/issues/526
I think it may be possible to express this as one of the hints, although I'm not averse to an additional rule either. Trade off is the rule is easier to ignore one rule specifically, but adding an additional hint should have better performance over an additional rule
(Also apologies, just merged in another PR so needs conflicts resolved)
Disadvantages of converting this into a hint:
- Can't be disabled by default (and I've already known 2 people which don't like this rule).
- There's already a hint that recommends you to use [x] instead of x::[], so fixing this hint might lead to yet another hint, unless we change that hint to recommend a Singleton func, but should we? (See 1. :) )
...just merged in another PR so needs conflicts resolved)
No worries, I'll rebase myself soon.
Superseded by https://github.com/fsprojects/FSharpLint/pull/587