Skip to content

lunij/SwiftLintPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftLintPlugin

A Swift Package Plugin for SwiftLint.

It can run SwiftLint as a pre-build command and show errors and warnings in Xcode.

It can make use of swiftlint --fix either manually by using the package menu item in Xcode 14+ or automatically by using the pre-build command plugin.

This SwiftLint plugin uses the official SwiftLint binary. It does not fetch any source dependencies as it does with the official SwiftLint plugin.

Usage

.package(url: "https://github.com/lunij/SwiftLintPlugin", from: "x.y.z")
.target(
    name: "...",
    plugins: [
        .plugin(name: "SwiftLint", package: "SwiftLintPlugin")
        // and/or
        .plugin(name: "SwiftLintPrebuildFix", package: "SwiftLintPlugin")
    ]
)