Giter VIP home page Giter VIP logo

swiftlint's Introduction

SwiftLint

An experimental tool to enforce Swift style and conventions, loosely based on GitHub's Swift Style Guide.

SwiftLint hooks into Clang and SourceKit to use the AST representation of your source files for more accurate results.

Test Status

Installation

Using Homebrew

brew install swiftlint

You can also install SwiftLint by downloading SwiftLint.pkg from the latest GitHub release and running it.

You can also build from source by cloning this project and running make install.

Usage

Xcode

Integrate SwiftLint into an Xcode scheme to get warnings and errors displayed in the IDE. Just add a new "Run Script Phase" with /usr/local/bin/swiftlint as its contents.

Atom

To integrate SwiftLint with Atom install the linter-swiftlint package from APM.

Command Line

$ swiftlint help
Available commands:

   help      Display general or command-specific help
   lint      Print lint warnings and errors for the Swift files in the current directory (default command)
   rules     Display the list of rules and examples
   version   Display the current version of SwiftLint

Run swiftlint in the directory containing the Swift files to lint. Directories will be searched recursively.

Rules

There are only a small number of rules currently implemented, but we hope the Swift community (that's you!) will contribute more over time. Pull requests are encouraged.

The rules that are currently implemented are mostly there as a starting point and are subject to change.

See the Source/SwiftLintFramework/Rules directory to see the currently implemented rules.

License

MIT licensed.

swiftlint's People

Contributors

jpsim avatar chriseidhof avatar akirahrkw avatar larslockefeer avatar andreamazz avatar boostworthy avatar pawrsccouk avatar segiddins avatar keith avatar keplersj avatar nschum avatar

Watchers

 avatar Patrick Cunnane avatar Greg Mefford avatar charlie bowman avatar Paul Fedory avatar Jorge Mendez avatar Photis Patriotis avatar Lance Halvorsen avatar David avatar Rich Goldman avatar Todd Thomas avatar Bobak Emamian avatar James Cloos avatar Tyler Pearson avatar  avatar Mo Soliman avatar Evan Kuchar avatar Corey Hanson avatar Chris Keathley avatar  avatar Carroll Yu avatar Tiffany Peng avatar Lily Kuang avatar Tim Kutnick avatar  avatar Chad Brading avatar Kevin Kimball avatar William Wilson avatar Rahul avatar  avatar Erik Ketcham avatar  avatar  avatar Jony Ive avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.