Skip to content

Commit

Permalink
add SwiftLintPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
417-72KI committed Aug 27, 2024
1 parent fca4ea3 commit 8fff053
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// swift-tools-version:5.7
// swift-tools-version:5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let isDevelop = true

let package = Package(
name: "SSGH",
platforms: [.macOS(.v12)],
Expand Down Expand Up @@ -51,3 +53,16 @@ let package = Package(
],
swiftLanguageVersions: [.v5]
)

if isDevelop {
package.dependencies.append(contentsOf: [
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.56.2"),
])

package.targets.filter { $0.type == .regular }.forEach {
if $0.plugins == nil { $0.plugins = [] }
$0.plugins?.append(contentsOf: [
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"),
])
}
}

0 comments on commit 8fff053

Please sign in to comment.