A Swift Package Manager Plugin for SwiftLint that will run it before each build
SwiftLint has its own implementation
Add the package as a dependency to your Package.swift
:
dependencies: [
.package(url: "https://github.com/mshurkin/SwiftLintPlugin", from: "0.52.4"),
]
Then add SwiftLintPlugin
plugin to your targets:
targets: [
.target(
name: "YOUR_TARGET",
dependencies: [],
plugins: [
.plugin(name: "SwiftLintBuildPlugin", package: "SwiftLintPlugin")
]
),
Add this package to your project dependencies. Select a target and open the Build Phases
inspector. Open Run Build Tool Plug-ins
and add SwiftLintBuildPlugin
from the list.
Plugin look for a swiftlint.yml
configuration file in the root of your package (in the same folder as Package.swift
) and in the target's folder. If files are found in both places, the file in the target's folder is preferred.
SwiftGenPlugin is released under the MIT license. See LICENSE file for more info.