How do I use swiftlint to lint a single file?

2019-02-22 09:46发布

I'd like to use swiftlint to lint a single file. How do I accomplish this? Checking the docs on https://github.com/realm/SwiftLint was not helpful.

标签: swiftlint
2条回答
Explosion°爆炸
2楼-- · 2019-02-22 10:10
SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0="foo.swift" swiftlint lint --use-script-input-files
查看更多
神经病院院长
3楼-- · 2019-02-22 10:14

You can also do this with:

swiftlint --path 'path to your file'
查看更多
登录 后发表回答