Skip to content

An Xcode plugin to enable/disable running SwiftLint

License

Notifications You must be signed in to change notification settings

dimohamdy/SwiftLintPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftLintPlugin

MIT License

An Xcode plugin to enable/disable running SwiftLint, and customizable by shell script.

Many thanks to ExtraBuildPhase for the base code. This plugin just adds ability to enable/disable running the lint. If you don't want to run swiftLint with every build. Then, use this plugin.

screenshots

Requirements

  • Xcode 7.1 or later
  • SwiftLint for default shell script

Installation

Using Installers

Build By Yourself

  1. Building the project with Xcode will install the plugin.

Restart Xcode after installing

Usage

  1. Enable SwiftLint from Product -> SwiftLint.
  2. Build the project.
  3. You can then Disable SwiftLint from Product -> SwiftLint, then build again.

Configuration

# Change shell script
defaults write com.mohamede1945.SwiftLintPlugin shellScript -string '
if which swiftlint >/dev/null; then
    swiftlint lint --use-script-input-files --config ~/.swiftlint.yml 2>/dev/null
fi
exit 0 # ignore result of swiftlint
'
# Changes will be applied after "Product > Clean⇧⌘K"

# Show environment variables in build log
defaults write com.mohamede1945.SwiftLintPlugin showEnvVarsInLog -bool true

# Run shell script not only on Xcode, but also xcodebuild.
defaults write com.mohamede1945.SwiftLintPlugin isNotLimitedToXcode -bool true

Author

Mohamed Afifi, [email protected]

License

SwiftLintPlugin is available under the MIT license. See the LICENSE file for more info.

About

An Xcode plugin to enable/disable running SwiftLint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published