Other

项目介绍

ruiaureliano/x-swiftformat 是一个托管在 GitHub 上的开源项目,主要使用 Swift 编写,采用 Other 许可证,目前获得 778 个 Star、24 次 Fork。

仓库全名
ruiaureliano/x-swiftformat
开源许可证
Other
Star 数
778
Fork 数
24
未关闭 Issue
4

README 摘要

🛠 X-SwiftFormat Installation Using Github Using Cask brew install --cask x-swiftformat Usage 1) Open X-SwiftFormat X-SwiftFormat works as Xcode Extension to format your swift code. You will need to open this once to activate it 👍 a) You case use the Preview to see the format running in the app 💪 b) You can export a configuration file ( .swift-format ) to use later 🖥 2) Enable X-SwiftFormat Open System…

完整内容见 GitHub 原始 README 或本页 。

常见问题

x-swiftformat 用什么语言开发?

主要使用 Swift 编写,采用 Other 许可证,目前有 778 个 Star。

x-swiftformat 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 x-swiftformat 的源码?

可以直接克隆仓库:git clone https://github.com/ruiaureliano/x-swiftformat.git,默认分支为 main;安装与运行步骤见仓库 README。

x-swiftformat 最近还在维护吗?

仓库最近一次更新为 2025年7月31日,当前有 4 个未关闭 Issue;Star 数为 778,可作为社区活跃度的参考。

关于

X-SwiftFormat extension for Xcode

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
839
价值分
475
活跃状态
活跃

README

🛠 X-SwiftFormat

Installation

Using Github

Using Cask

brew install --cask x-swiftformat

Usage

1) Open X-SwiftFormat

X-SwiftFormat works as Xcode Extension to format your swift code. You will need to open this once to activate it 👍

xsf-running-light xsf-running-light

a) You case use the Preview to see the format running in the app 💪

xsf-format-light xsf-format-light

b) You can export a configuration file ( .swift-format ) to use later 🖥

2) Enable X-SwiftFormat

Open System Preferences ▸ Privacy & Security ▸ Extensions ▸ Xcode Source Editor and make sure X-SwiftFormat is selected ✅

xsf-extensions-light xsf-extensions-light

3) Use X-SwiftFormat

Open Xcode and use the Format Swift Code command in Xcode’s Editor menu 🚀

xsf-usage-light xsf-usage-light

4) Add X-SwiftFormat Shortcut

Open System Preferences ▸ PKeyboard ▸ Keyboard Shortcuts ▸ App Shortcuts, then hit the + button. Select Xcode, enter Format Swift Code and set your Shortcut.👏

xsf-shortcuts-light xsf-shortcuts-light


Installing Apple Swift Format (Xcode or Mint)

a) Using Xcode

if you are using Xcode 15 (Swift 6.2), you can check out and build swift-format using the following commands:

git clone -b release/6.2 https://github.com/apple/swift-format.git
cd swift-format
swift build

You should see this

Build complete! (50.00s)

👍👍👍

b) Using Mint

If you did not have Homebrew, install here

brew install mint
mint install apple/swift-format@release/6.2

You should see this

🌱 Cloning swift-format release/6.2
🌱 Resolving package
🌱 Building package
🌱 Installed swift-format release/6.2
🌱 Linked swift-format release/6.2

👍👍👍

Command Line Usage

swift-format -v
600.0.0
Command Description
swift-format swift Display formatted code
swift-format -i file.swift Overwrites formatted code
swift-format -r folder Format all files in a folder
swift-format -r -i folder Format all files in a folder and overwrites

Check more info here: https://github.com/apple/swift-format


I’m Rui Aureliano, iOS and macOS Engineer at Olá Brothers. We make Sip 🤓

Linkedin | Twitter | Github | Stackoverflow

评论

暂无评论