Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert extra spaces around index between method calling and member variable accessing #2760

Closed
1 of 3 tasks
clkbug opened this issue Feb 2, 2023 · 0 comments · Fixed by #2764
Closed
1 of 3 tasks

Comments

@clkbug
Copy link
Contributor

clkbug commented Feb 2, 2023

Issue created from fantomas-online

Code

x().y[0].z // spaces inserted around index
x().y.[0].z // no spaces inserted
x().y[0] // no spaces inserted
x.y[0].z // no spaces inserted

Result

x().y[ 0 ].z // spaces inserted around index
x().y.[0].z // no spaces inserted
x().y[0] // no spaces inserted
x.y[0].z // no spaces inserted

Problem description

Fantomas insert spaces around index only after method calling and before variable accessing.

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.
    • if easy and not urgent

Options

Fantomas v5.2 branch at 1/1/1990

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants