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

Add extension support to organizeDeclarations #743

Merged

Conversation

calda
Copy link
Collaborator

@calda calda commented Sep 19, 2020

The PR adds support for organizing the body of extension declarations with organizeDeclarations.

This is optional, since you'd probably only want to do this if you're using the extensionAccessControl rule (#742), and configurable using the new --organizetypes option.

`--structthreshold` | Minimum line count to organize struct body. Defaults to 0
`--classthreshold` | Minimum line count to organize class body. Defaults to 0
`--enumthreshold` | Minimum line count to organize enum body. Defaults to 0
`--extensionlength` | Minimum line count to organize extension body. Defaults to 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have preferred to call this --extensionthreshold to match the other existing options, but that was two characters over the 16 character limit.

@coveralls
Copy link

coveralls commented Sep 19, 2020

Coverage Status

Coverage decreased (-0.04%) to 93.915% when pulling 7c37eb5 on calda:cal--organizeDeclarations-extension into aed132e on nicklockwood:develop.

@calda calda force-pushed the cal--organizeDeclarations-extension branch from a9e3d64 to 7c37eb5 Compare September 26, 2020 02:02
@calda
Copy link
Collaborator Author

calda commented Sep 26, 2020

@nicklockwood I rebased this PR off of the latest changes to develop

@nicklockwood nicklockwood merged commit 3e9cf10 into nicklockwood:develop Sep 26, 2020
Lukasz2891 pushed a commit to Lukasz2891/SwiftFormat that referenced this pull request Oct 23, 2020
leogdion pushed a commit to brightdigit/SwiftFormatSlim that referenced this pull request Nov 6, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants