scalafmt
scalafmt copied to clipboard
Is there a way to annotate a list/map to always keep it sorted?
Steps
Given code like this:
val myList = (
"b",
"c",
"d",
"a",
....
)
Expectation
I would like to add a comment/annotation to this long list to keep it sorted.
val myList = (
// sorted: start
"b",
"c",
"d",
"a",
....
// sorted: end
)
Thanks for reporting! I think it's unlikely that it can be covered by scalaftmt, since this changes the semantics of the program and would go beyond what a formater should do.