fantomas
fantomas copied to clipboard
Multiple List concat operators are not seen as the same operator.
Issue created from fantomas-online
Code
let allDecls = inheritsL @ iimplsLs @ ctorLs @ instanceValLs @ methLs @ ilFieldsL @ propLs @ eventLs @ staticValLs @ nestedTypeLs
let allDecls = inheritsL + iimplsLs + ctorLs + instanceValLs + methLs + ilFieldsL + propLs + eventLs + staticValLs + nestedTypeLs
Result
let allDecls =
inheritsL
@ iimplsLs
@ ctorLs
@ instanceValLs
@ methLs @ ilFieldsL @ propLs @ eventLs @ staticValLs @ nestedTypeLs
let allDecls =
inheritsL
+ iimplsLs
+ ctorLs
+ instanceValLs
+ methLs
+ ilFieldsL
+ propLs
+ eventLs
+ staticValLs
+ nestedTypeLs
Problem description
Fantomas has heurstic that if the operators are all the same in a large nested infix application, it will place them all on a new line. For some reason, this isn't working for @.
Extra information
- [ ] The formatted result breaks my code.
- [ ] The formatted result gives compiler warnings.
- [ ] I or my company would be willing to help fix this.
Options
Fantomas master branch at 2022-09-01T05:33:17Z - 582e9ab5dc7d7e041e5f4d1ce203dc40b98d98a7
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The problem isn't limited to @, sample with ^^
Fix available in v5.2.0-beta-001