No release in over a year
Run swift code formatting using SwiftFormat
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

fastlane-plugin-swiftformat

Version shield Total downloads shield

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-swiftformat, add it to your project by running:

gem 'fastlane-plugin-swiftformat'

About fastlane-plugin-swiftformat

Run swift code formatting using SwiftFormat with fastlane. An up-to-date list with all available rules can be found in Rules.md along with documentation for how they are used.

Example Code
swiftformat(
  executable: "Pods/SwiftFormat/CommandLineTool/swiftformat", # Path to the `swiftformat` executable on your machine (optional)
  path: "path/to/format",                                     # Path to format (optional)
  rules: "indent,linebreaks",                                 # Specify a whitelist of rules (optional)
  disable: "redundantSelf,trailingClosures",                  # Specify rules to disable (optional)
  enable: "isEmpty",                                          # Specify rules to enable (optional)
  swiftversion: "5.1"                                         # Specify swift version (optional)
  config: "path/to/configuration/.swiftformat"                # Path to configuration file (optional)
  header: '{file}\nCopyright (c) 2022 Foobar Industries'      # Strip or replace the header comments in every file with the given template (optional)
  dryrun: false,                                              # Run in dry mode (without actually changing any files) (optional)
  lint: true                                                  # Like `--dryrun`, but returns an error if formatting is needed (optional)
)

Run tests for this plugin

To run both the tests, and code style validation, run

rake

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.