You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Line comment after the opening parenthesis of a type moves and breaks the type #3559
Fantomas cannot parse the code it produced. The diagnostics are about that code.
A line comment after the ( of a parenthesized type is written after the first type inside instead, and the rest of the type goes on the next line, at the indent. For a generic type that splits Map from <string, int>, which does not parse.
Other types inside the parentheses go wrong in other ways:
( // c then int * string: the result is not idempotent, the second format moves the * to a line of its own.
( // c then a -> b: valid, but the comment still moves after a, and a blank line appears under it.
A comment on the line after the (, or after the first type, is kept where it is.
Not a regression: 7.0.6, 8.0.10, main and the 9.0.0-alpha-001 preview all fail.
I or my company would be willing to help fix this.
I would like a release if this problem is solved.
Options
Fantomas main branch at 2026-10-20T12:59:18Z - 79babfa
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.
Activity
Keep a line comment after the opening parenthesis of a type there