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

Rule organizeDeclarations option --typeorder refuses value computedProperty #1965

Open
Lommelun opened this issue Jan 21, 2025 · 3 comments
Open

Comments

@Lommelun
Copy link
Contributor

Lommelun commented Jan 21, 2025

The documentation specifies computedProperty as one of the default values and swiftformat runs without issue with no custom --typeorder.

However fails with the following if the typeorder defined in the section above is copied (and spaces removed).

--typeorder beforeMarks,nestedType,staticProperty,staticPropertyWithBody,classPropertyWithBody,overriddenProperty,swiftUIPropertyWrapper,instanceProperty,computedProperty,instanceLifecycle,swiftUIProperty,swiftUIMethod,overriddenMethod,staticMethod,classMethod,instanceMethod
Running SwiftFormat...
Reading config file at ../.swiftformat
error: 'computedProperty' is not a valid parameter for --typeorder. Did you mean 'staticProperty?'.
@Lommelun
Copy link
Contributor Author

Is this value removed, renamed or is this a bug?

@calda
Copy link
Collaborator

calda commented Jan 23, 2025

Which version of SwiftFormat are you using? This option was added in 0.55.5.

@calda
Copy link
Collaborator

calda commented Jan 23, 2025

If you can still reproduce this on SwiftFormat 0.55.5, could you share the full config and command invocation?

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

No branches or pull requests

2 participants