Closed RicoSaupeBosch closed 10 months ago
Hi there, this looks a lot like https://fsprojects.github.io/fantomas/docs/end-users/FAQ.html#Why-does-Fantomas-format-my-lists-strangely-when-I-pass-them-as-arguments
fields.Required.At["serviceType"; "case"]Decode.string
needs spaces in order not to be confused with the new indexer syntax. fields.Required.At ["serviceType"; "case"] Decode.string
formats correctly
@nojaf your are right, with that it formats correctly and its even adding spaces inside the brackets. Then maybe fantomas could check for that and already format this correctly. Currently without any spaces after the At its not doing anything.
like that line
fields.Required.At["maxInstances"]Decode.int
to that
fields.Required.At [ "maxInstances" ] Decode.int
Bad input will lead to a bad format result, this has always been the case for Fantomas.
I'm actually surprised you are not getting warning FS3365
for fields.Required.At
.
I don't think there is really anything actionable on Fantomas' side. I'll open an issue at the compiler for the missing warning. Thanks for understanding.
fantomas removes the ; and breaks the code of the decoder.
Issue created from fantomas-online
Code
Result
Problem description
Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.
Extra information
Options
Fantomas main branch at 2023-08-31T06:37:49Z - 369faf81362e7ddb3fce3bd4505216055af35347
Default Fantomas configuration
Did you know that you can ignore files when formatting by using a .fantomasignore file? PS: It's unlikely that someone else will solve your specific issue, as it's something that you have a personal stake in.