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
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start 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