Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 swiftlint 对单个文件进行 lint。我该如何做到这一点?检查https://github.com/realm/SwiftLint上的文档没有帮助。
你也可以这样做:
swiftlint --path 'path to your file'
SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0="foo.swift" swiftlint lint --use-script-input-files
一次 lint 多个文件:
$ swiftlint -- file1.swift file2.swift