[Lib::Lint] Add a --swift-version option

parent 223bd86b
...@@ -21,6 +21,7 @@ module Pod ...@@ -21,6 +21,7 @@ module Pod
'(defaults to https://github.com/CocoaPods/Specs.git). ' \ '(defaults to https://github.com/CocoaPods/Specs.git). ' \
'Multiple sources must be comma-delimited.'], 'Multiple sources must be comma-delimited.'],
['--private', 'Lint skips checks that apply only to public specs'], ['--private', 'Lint skips checks that apply only to public specs'],
['--swift-version=VERSION', 'The SWIFT_VERSION that should be used to lint the spec'],
].concat(super) ].concat(super)
end end
...@@ -34,6 +35,7 @@ module Pod ...@@ -34,6 +35,7 @@ module Pod
@use_frameworks = !argv.flag?('use-libraries') @use_frameworks = !argv.flag?('use-libraries')
@source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',') @source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
@private = argv.flag?('private', false) @private = argv.flag?('private', false)
@swift_version = argv.option('swift-version', nil)
@podspecs_paths = argv.arguments! @podspecs_paths = argv.arguments!
super super
end end
...@@ -55,6 +57,7 @@ module Pod ...@@ -55,6 +57,7 @@ module Pod
validator.only_subspec = @only_subspec validator.only_subspec = @only_subspec
validator.use_frameworks = @use_frameworks validator.use_frameworks = @use_frameworks
validator.ignore_public_only_results = @private validator.ignore_public_only_results = @private
validator.swift_version = @swift_version
validator.validate validator.validate
unless @clean unless @clean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment