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

error: 'ranges' is not a formatting rule. Did you mean 'spaceAroundOperators'? #842

Closed
funzin opened this issue Jan 6, 2021 · 2 comments

Comments

@funzin
Copy link

funzin commented Jan 6, 2021

I got the following error when run swiftformat.

error: 'ranges' is not a formatting rule. Did you mean 'spaceAroundOperators'?

As of 0.47.1, it was a warning, but since 0.47.2, the error seems to be happening.
The error is output, but the formatting behavior is still there.
The following is the .swiftformat that I am using.

# disable
--disable wrapMultilineStatementBraces

# format options
--stripunusedargs closure-only
--self init-only
--commas inline
--extensionacl on-declarations
@nicklockwood
Copy link
Owner

@funzin it seems likely that you either have another .swiftformat file somewhere, or you are passing some arguments to the swiftformat command line tool. Is that possible?

Swiftformat logs all of the config files that it encounters while running in the console, if that helps.

@funzin
Copy link
Author

funzin commented Jan 6, 2021

The .swiftformat was also included under Carthage/Checkout😇
I was able to fix it by changing the path.

Thanks for the reply:pray:

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

No branches or pull requests

2 participants