How do I use swiftlint to lint a single file?

▼魔方 西西 提交于 2019-12-01 17:02:39

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!