A tool to enforce Swift style and conventions, loosely based on the now archived GitHub Swift Style Guide. SwiftLint enforces the style guide rules that are generally accepted by the Swift community. These rules are well described in popular style guides like Ray Wenderlich’s Swift Style Guide. SwiftLint hooks into Clang and SourceKit to use the AST representation of your source files for more accurate results. You might want to move your SwiftLint phase directly before ‘Compile Sources’ step, to detect errors quickly before compiling. However, SwiftLint is designed to run on valid Swift code that cleanly completes the compiler’s parsing stage. So running SwiftLint before ‘Compile Sources’ might yield some incorrect results. SwiftLint hooks into SourceKit so it continues working even as Swift evolves! This also keeps SwiftLint lean, as it doesn’t need to ship with a full Swift compiler, it just communicates with the official one you already have installed on your machine.

Features

  • SwiftLint hooks into Clang and SourceKit
  • Over 100 rules are included in SwiftLint
  • Rules can be disabled with a comment inside a source file
  • Run swiftlint rules to print a list of all available rules and their identifiers
  • Configure SwiftLint by adding a .swiftlint.yml file from the directory you’ll run SwiftLint from
  • You can define custom regex-based rules in your configuration file

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow SwiftLint

SwiftLint Web Site

Other Useful Business Software
AI-powered service management for IT and enterprise teams Icon
AI-powered service management for IT and enterprise teams

Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity. Maximize operational efficiency with refreshingly simple, AI-powered Freshservice.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SwiftLint!

Additional Project Details

Programming Language

Swift

Related Categories

Swift Library Management Software

Registered

2021-04-07