# realm/SwiftLint

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/realm-swiftlint).**

19,456 stars · 2,285 forks · Swift · mit

## Links

- GitHub: https://github.com/realm/SwiftLint
- Homepage: https://realm.github.io/SwiftLint
- awesome-repositories: https://awesome-repositories.com/repository/realm-swiftlint.md

## Topics

`code-quality` `hacktoberfest` `linter` `linting` `static-analysis` `swift`

## Description

SwiftLint is a static analysis tool and code formatter designed to enforce consistent coding styles and identify semantic issues within Swift source code. It functions as a command-line utility that evaluates code against established conventions to ensure uniform structure and architectural standards across a project.

The tool distinguishes itself through a custom linting engine that leverages compiler-integrated syntax analysis to perform deep inspections of code structure. Beyond simple pattern matching, it supports automated source code transformation to correct formatting violations and resolve style errors directly within the source files.

The project provides extensive support for custom validation logic, allowing developers to define bespoke rules using regular expressions or native code to meet specific project requirements. It also manages complex environments through hierarchical configuration merging, which enables the application of consistent rules across large, modular codebases by resolving inheritance and local overrides.

## Tags

### Testing & Quality Assurance

- [Static Code Analysis Tools](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/static-code-analysis-tools.md) — Enforces consistent Swift coding styles and identifies semantic issues using compiler-level syntax analysis.
- [Automated Code Fixers](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/automated-code-fixers.md) — Automatically corrects formatting and style violations to ensure consistent codebase structure. ([source](https://realm.github.io/SwiftLint))

### Development Tools & Productivity

- [Code Formatters](https://awesome-repositories.com/f/development-tools-productivity/code-formatters.md) — Automates the correction of formatting violations to ensure a uniform Swift codebase structure.
- [Linting Engines](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/linting-engines.md) — Provides a custom linting engine for defining bespoke rules to enforce architectural standards.
- [Coding Style Tools](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/code-quality-verification/coding-style-tools.md) — Maintains consistent Swift coding standards through automated identification and reporting of style deviations.
- [Automated Code Refactoring](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-and-transformation/automated-code-refactoring.md) — Automatically refactors code by applying style corrections to maintain a uniform structure.
- [Framework Linting Rules](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules/framework-linting-rules.md) — Enforces project-specific coding patterns and validation rules beyond standard linting checks. ([source](https://realm.github.io/SwiftLint/rule-directory.html))
- [Compiler-Level Analyzers](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-code-analyzers/source-code-analysis/compiler-level-analyzers.md) — Examines source code using compiler-level information to detect complex logical issues. ([source](https://realm.github.io/SwiftLint))
- [Configuration Inheritance](https://awesome-repositories.com/f/development-tools-productivity/configuration-inheritance.md) — Manages hierarchical configuration settings with support for inheritance and module-specific overrides. ([source](https://realm.github.io/SwiftLint))
- [Source Code Patchers](https://awesome-repositories.com/f/development-tools-productivity/source-patching-utilities/source-code-patchers.md) — Automatically modifies source files to resolve identified style and formatting violations.

### Software Engineering & Architecture

- [Static Analysis](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis.md) — Provides custom static analysis capabilities for detecting project-specific patterns and semantic issues.
- [Custom Validation Rules](https://awesome-repositories.com/f/software-engineering-architecture/custom-validation-rules.md) — Allows developers to define bespoke validation logic to enforce project-specific coding standards. ([source](https://realm.github.io/SwiftLint))
- [Coding Standards](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/code-craftsmanship-standards/coding-standards.md) — Analyzes source code against established style rules to identify and report deviations from coding conventions. ([source](https://realm.github.io/SwiftLint))
- [Project Configuration Management](https://awesome-repositories.com/f/software-engineering-architecture/project-configuration-management.md) — Centralizes configuration management for Swift projects to ensure consistent linting across modular codebases.
- [Hierarchical Configuration Systems](https://awesome-repositories.com/f/software-engineering-architecture/hierarchical-configuration-systems.md) — Merges nested configuration files to enforce consistent rules across modular project structures.
- [Syntax Tree Analysis](https://awesome-repositories.com/f/software-engineering-architecture/syntax-tree-analysis.md) — Leverages compiler-integrated syntax trees to perform deep inspection of code structure and semantic correctness.

### Data & Databases

- [Semantic Querying](https://awesome-repositories.com/f/data-databases/semantic-search-engines/semantic-querying.md) — Inspects code structure to identify semantic issues like unused declarations and incorrect references. ([source](https://realm.github.io/SwiftLint/rule-directory.html))
