Added doc and acceptance tests (#2540)

This commit is contained in:
Josh Holtz 2021-02-18 11:57:05 -06:00 committed by GitHub
parent bcd2bfd317
commit ee420961d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -6,4 +6,5 @@ Feature: Lint code using Tuist (SwiftLint)
Then I copy the fixture app_with_framework_where_framework_failing_swiftlint into the working directory
Then tuist lints project's code and fails
Then tuist lints code of target with name "Framework" and fails
Then tuist lints code of target with name "App" and passes
Then tuist lints code of target with name "App" and passes
Then tuist strict lints code of target with name "App" and fails

View File

@ -13,7 +13,12 @@ Then(/tuist lints code of target with name "(.+)" and passes/) do |targetName|
flunk(err) unless status.success?
end
Then(/tuist strict lints code of target with name "(.+)" and fails/) do |targetName|
out, err, status = Open3.capture3("swift", "run", "tuist", "lint", "code", targetName, "--path", @dir, "--strict")
flunk(err) if status.success?
end
Then(/tuist lints code of target with name "(.+)" and fails/) do |targetName|
out, err, status = Open3.capture3("swift", "run", "tuist", "lint", "code", targetName, "--path", @dir)
flunk(err) if status.success?
end
end

View File

@ -76,5 +76,9 @@ You can provide your SwiftLint configuration file by placing it under the root `
default: '',
optional: true,
},
{
long: '`--strict`',
description: 'Fails on warnings.',
},
]}
/>