Skip to content

Commit

Permalink
Avoid throwing error for new types of reporters. (fastlane#17935)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerluan authored Jan 21, 2021
1 parent e0907cb commit d8d2988
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fastlane/lib/fastlane/actions/swiftlint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ def self.available_options
optional: true),
FastlaneCore::ConfigItem.new(key: :reporter,
env_name: "FL_SWIFTLINT_REPORTER",
description: "Choose output reporter. Available: xcode, json, csv, checkstyle, junit, html, \
emoji, sonarqube, markdown, github-actions-logging",
description: "Choose output reporter. Available: xcode, json, csv, checkstyle, codeclimate, \
junit, html, emoji, sonarqube, markdown, github-actions-logging",
is_string: true,
optional: true,
verify_block: proc do |value|
available = ['xcode', 'json', 'csv', 'checkstyle', 'junit', 'html', 'emoji', 'sonarqube', 'markdown', 'github-actions-logging']
UI.user_error!("Available values are '#{available.join("', '")}'") unless available.include?(value)
available = ['xcode', 'json', 'csv', 'checkstyle', 'codeclimate', 'junit', 'html', 'emoji', 'sonarqube', 'markdown', 'github-actions-logging']
UI.warning("Known 'reporter' values are '#{available.join("', '")}'. If you're receiving errors from swiftlint related to the reporter, make sure the reporter identifier you're using is correct and it's supported by your version of swiftlint.") unless available.include?(value)
end),
FastlaneCore::ConfigItem.new(key: :quiet,
env_name: "FL_SWIFTLINT_QUIET",
Expand Down

0 comments on commit d8d2988

Please sign in to comment.