LoginSignup
1
0

More than 3 years have passed since last update.

Mint + SwiftFormatで躓いた話

Last updated at Posted at 2019-11-24

MintはXcodeGenやSwiftFormat、SwiftLintなど便利なコマンドラインツールをまとめてくれるやつです。
https://github.com/yonaskolb/Mint

Mintのインストール

Homebrewでいけます
brew install mint

Mintfileに必要なツールを記述

yonaskolb/xcodegen@2.10.1
nicklockwood/SwiftFormat@0.40.14

ツールのインストール

mint bootstrap

ツールの実行

BuildPhasesに新規でRunScriptを追加
bootstrapで入れたので実行にはmint runを使います

mint run swiftformat . 

実際にBuildしてみるとCommand PhaseScriptExecution failed with a nonzero exit codeが出てしまった、、。

エラーの原因

https://github.com/yonaskolb/Mint/issues/145
詳しく読んではいないのですが、どうやら
mint run <repository> <binary> [args]
こう言う風に書くのが正しいっぽいです。

mint run swiftformat swiftformat .
or
mint run nicklockwood/SwiftFormat swiftformat .
と書くと正しく動きます。

リポジトリを指すので混乱を避けるために
mint run nicklockwood/SwiftFormat swiftformat .
と書いてあげる方が良さそうです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0