Skip to content

Fix FavourSingleton rule false negatives - #883

Merged
knocte merged 7 commits into
fsprojects:masterfrom
webwarrior-ws:fix-favour-singleton
Aug 10, 2026
Merged

Fix FavourSingleton rule false negatives#883
knocte merged 7 commits into
fsprojects:masterfrom
webwarrior-ws:fix-favour-singleton

Conversation

@webwarrior-ws

Copy link
Copy Markdown
Contributor

Previously FavourSingleton rule would only fire on lists that are right-hand side of let binding, and only on single-item lists where item is a constant or an identifier.

Extended FavourSingleton to consider all single-item lists and arrays, and added regression tests.

For lists that are not right-hand side of a binding.
Made it fire on single-item lists in all positions, not only
in let bindings.
For single-item lists where item is not a constant or an identifier.
Made it fire on single-item lists where item is not a constant
or an identifier.
@knocte knocte changed the title Fix FavourSingleton rule Fix FavourSingleton rule false negatives Aug 10, 2026
@knocte
knocte merged commit 32590c9 into fsprojects:master Aug 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants