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

Find configuration based on CWD when formatting from stdin #685

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

judemille
Copy link
Contributor

See #684.

This change is useful for formatting clients that prefer to format via
stdio.

The signature of ConfigurationLoader.configuration(forSwiftFileAt:URL)
was changed to configuration(forPath:URL) since the function is useful
not just for Swift files, but any arbitrary file path.

@DaveEwing
Copy link
Contributor

This looks ready to go to me. (I was gonna grab the issue myself as I need this ability too, and then saw this PR.) Requesting a review from @allevato.

Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

One comment but otherwise LGTM!

Sources/swift-format/Frontend/Frontend.swift Outdated Show resolved Hide resolved
This change is useful for formatting clients that prefer to format via
stdio. The signature of
`ConfigurationLoader.configuration(forSwiftFileAt:URL)` was changed to
`configuration(forPath:URL)` since the function is useful not just for
Swift files, but any arbitrary file path.

Signed-off-by: Julia DeMille <[email protected]>
Copy link
Member

@allevato allevato left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

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.

3 participants