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

[Commands] Add preliminary support for swift-format #2024

Closed
wants to merge 1 commit into from

Conversation

ankitspd
Copy link
Member

This adds just a simple swift package format command to format all the
sources in your root package. The swift-format binary will be looked up
using the env variable SWIFT_FORMAT_EXEC.

This patch is just for testing the proposed swift-format tool. We will
need to figure out the specifics of the integration if/when the proposal
is accepted.

This adds just a simple `swift package format` command to format all the
sources in your root package. The swift-format binary will be looked up
using the env variable SWIFT_FORMAT_EXEC.

This patch is just for testing the proposed swift-format tool. We will
need to figure out the specifics of the integration if/when the proposal
is accepted.
case .format:
// Look for swift-format binary.
// FIXME: This should be moved to user toolchain.
guard let swiftFormat = lookupExecutablePath(filename: getenv("SWIFT_FORMAT_EXEC")) else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Toolchain comes with swift-format that could be used by default here

@shahmishal
Copy link
Member

@swift-ci smoke test Linux

@ankitspd ankitspd closed this Jul 25, 2019
@ankitspd ankitspd deleted the swift-format branch July 25, 2019 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants