-
-
Notifications
You must be signed in to change notification settings - Fork 892
Open
Copy link
Labels
help wantedContributions encouragedContributions encouraged
Description
Currently when using the "Add missing patterns" code action, the missing patterns are inserted in alphabetical order:
// The variants are defined as such:
type Wibble {
B
A
}
// Yet the code action yields:
case wibble {
A -> todo
B -> todo
}In my opinion it would be better if they were added in the same order in which they are defined.
Right now I often find myself manually reordering them, as I group "related" variants together to make the code clearer.
According to Gears:
The "missing patterns" error was sorted alphabetically in order to make testing more deterministic. The "add missing patterns" code action takes data from that error, so it's sorted alphabetically
It seems like the easiest solution might be to order the change the ordering in the error. Do you think that is acceptable or should we laser-target the code action?
sz3lbi
Metadata
Metadata
Assignees
Labels
help wantedContributions encouragedContributions encouraged