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

Update swiftformat #151

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

jpgrayson
Copy link
Contributor

This updates the validation tooling to use swiftformat 0.52.10 (was 0.48.17).

I'm assuming there is value in updating tooling from time to time. If not, we can just close this PR.

This updated version of swiftformat does drive several formatting changes. The most common is to change, e.g.:

if let thing = thing {
    ...
}

to

if let thing {
    ...

which seems like a nice enough improvement.

This is the latest version of swiftformat.

The .swiftformat config is modified to target Swift 5.7, which is the
oldest Swift currently supported by mqtt-nio.

The validate.sh script is updated to resolve some shellcheck issues.

Signed-off-by: Peter Grayson <pete@jpgrayson.net>
Signed-off-by: Peter Grayson <pete@jpgrayson.net>
@adam-fowler
Copy link
Collaborator

Is if let thing available in swift 5.7? I thought it came in 5.9.
MQTTNIO supports the last three minor releases of Swift which include 5.7

@jpgrayson
Copy link
Contributor Author

Since swiftformat is configured for a particular minimum swift version, I was sort of trusting it to do the right thing in this regard.

The CI build/test with swift 5.7 also works.

So it seems like this is okay.

@adam-fowler
Copy link
Collaborator

Of course you're right. Thanks for all the changes.

@adam-fowler adam-fowler merged commit 267b83a into swift-server-community:main Nov 28, 2023
8 checks passed
@jpgrayson
Copy link
Contributor Author

Thank you for taking the time to review these PR's. I very much appreciate your help!

@jpgrayson jpgrayson deleted the update-swiftformat branch November 28, 2023 14:33
@adam-fowler
Copy link
Collaborator

All your changes are in v2.11.0

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.

2 participants