Skip to content

In packages repo, swift-format should fall back to Xcode swift-format if not found on PATH #153803

Open
flutter/packages
#9460
@jmagman

Description

@jmagman

Xcode 16 now packages swift-format

$ xcrun --find swift-format
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-format

The format command should first check if --swift-format-path is passed in, then if swift-format is on the PATH, and then fallback to the results of the xcrun --find swift-format. And if that returns nothing, then fail.

https://github.com/flutter/packages/blob/1ab1a712e5df333026c9103fffa82f014e731d9b/script/tool/lib/src/format_command.dart#L230-L239

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectgood first issueRelatively approachable for first-time contributorspackageflutter/packages repository. See also p: labels.team-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions