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 Default
mode SwiftLint mode: :lint or :autocorrect :lint
output_file Path to output SwiftLint result
config_file Custom configuration file of SwiftLint
strict Fail on warnings? (true/false) 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) false
reporter Choose output reporter
quiet Don't print status logs like 'Linting ' & 'Done linting' false
executable Path to the swiftlint executable on your machine

* = default value is dependent on the user's system

To show the documentation in your terminal, run

fastlane action swiftlint

View source code

Back to actions