Run swift code validation using SwiftLint

Supported platforms ios, mac
Author @KrauseFx

1 Example

  mode: :lint,      # SwiftLint mode: :lint (default) or :autocorrect
  output_file: "swiftlint.result.json", # The path of the output file (optional)
  config_file: ".swiftlint-ci.yml",     # The path of the configuration file (optional)
  files: [# List of files to process (optional)
  ignore_exit_status: true    # Allow fastlane to continue even if SwiftLint returns a non-zero exit status


Key Description
mode SwiftLint mode: :lint (default) or :autocorrect; default is :lint
output_file Path to output SwiftLint result
config_file Custom configuration file of SwiftLint
strict Fail on warnings? (true/false)
files List of files to process
ignore_exit_status Ignore the exit status of the SwiftLint command, so that serious violations don't fail the build (true/false)
reporter Choose output reporter
quiet Don't print status logs like 'Linting ' & 'Done linting'
executable Path to the swiftlint executable on your machine

To show the documentation in your terminal, run

fastlane action swiftlint

View source code

Back to actions