问题
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.
回答1:
You can also do this with:
swiftlint --path 'path to your file'
回答2:
SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0="foo.swift" swiftlint lint --use-script-input-files
来源:https://stackoverflow.com/questions/38923401/how-do-i-use-swiftlint-to-lint-a-single-file