Update README (#6)
A SwiftLint Swift Package plugin.
This Plugin differs from the official SwiftLint plugin by using a binary version of SwiftLint, so you don’t have to build SwiftLint from source.
Add the SwiftLintPlugin dependency to your Package.swift file:
Package.swift
dependencies: [ .package(url: "https://github.com/adamayoung/swiftlint-plugin.git", from: "0.51.0") ]
For each of the Swift Package targets you want to lint during a build, add the plugin:
targets: [ .target( name: "MyTarget", plugins: [ .plugin(name: "SwiftLintPlugin", package: "swiftlint-plugin") ] ), ... ]
Now, when you build your Swift Package in Xcode, you will get inline SwiftLint warnings and errors.
To run SwiftLint from the command line in your Swift Package (e.g. during CI workflows):
swift package swiftlint
The command plugin also supports the following options:
--config <path to .swiftlint.yml file>
--reporter <reporter name>
github-actions-logging
--strict
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
SwiftLint Swift Package Plugin
A SwiftLint Swift Package plugin.
This Plugin differs from the official SwiftLint plugin by using a binary version of SwiftLint, so you don’t have to build SwiftLint from source.
Requirements
Setup
Build Tool Plugin
Add the SwiftLintPlugin dependency to your
Package.swift
file:For each of the Swift Package targets you want to lint during a build, add the plugin:
Now, when you build your Swift Package in Xcode, you will get inline SwiftLint warnings and errors.
Command Plugin
To run SwiftLint from the command line in your Swift Package (e.g. during CI workflows):
Options
The command plugin also supports the following options:
--config <path to .swiftlint.yml file>
--reporter <reporter name>
github-actions-logging
--strict