mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
Update minimum supported Swift version to Swift 5.7 (#1837)
This commit is contained in:
committed by
Cal Stephens
parent
24334e162e
commit
3185ffbf62
@@ -46,8 +46,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
swiftver:
|
||||
- swift:5.3
|
||||
- swift:5.10
|
||||
- swift:5.7
|
||||
- swift:6.0
|
||||
swiftos:
|
||||
- focal
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
--self remove
|
||||
--semicolons inline
|
||||
--stripunusedargs always
|
||||
--swiftversion 5.3
|
||||
--swiftversion 5.3 # TODO: Update to 5.7 after releasing Swift Format 0.56.0
|
||||
--trimwhitespace always
|
||||
--wraparguments preserve
|
||||
--wrapcollections preserve
|
||||
|
||||
+25
-4
@@ -1,4 +1,4 @@
|
||||
// swift-tools-version:4.2
|
||||
// swift-tools-version:5.7
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
@@ -6,10 +6,31 @@ let package = Package(
|
||||
products: [
|
||||
.executable(name: "swiftformat", targets: ["CommandLineTool"]),
|
||||
.library(name: "SwiftFormat", targets: ["SwiftFormat"]),
|
||||
.plugin(name: "SwiftFormatPlugin", targets: ["SwiftFormatPlugin"]),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "CommandLineTool", dependencies: ["SwiftFormat"], path: "CommandLineTool"),
|
||||
.target(name: "SwiftFormat", path: "Sources"),
|
||||
.testTarget(name: "SwiftFormatTests", dependencies: ["SwiftFormat"], path: "Tests"),
|
||||
.executableTarget(
|
||||
name: "CommandLineTool", dependencies: ["SwiftFormat"], path: "CommandLineTool",
|
||||
exclude: ["swiftformat"]
|
||||
),
|
||||
.target(name: "SwiftFormat", path: "Sources", exclude: ["Info.plist"]),
|
||||
.testTarget(
|
||||
name: "SwiftFormatTests",
|
||||
dependencies: ["SwiftFormat"],
|
||||
path: "Tests",
|
||||
exclude: ["GlobTest[5].txt"]
|
||||
),
|
||||
.plugin(
|
||||
name: "SwiftFormatPlugin",
|
||||
capability: .command(
|
||||
intent: .custom(
|
||||
verb: "swiftformat", description: "Formats Swift source files using SwiftFormat"
|
||||
),
|
||||
permissions: [
|
||||
.writeToPackageDirectory(reason: "This command reformats source files"),
|
||||
]
|
||||
),
|
||||
dependencies: [.target(name: "CommandLineTool")]
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
// swift-tools-version:5.6
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SwiftFormat",
|
||||
products: [
|
||||
.executable(name: "swiftformat", targets: ["CommandLineTool"]),
|
||||
.library(name: "SwiftFormat", targets: ["SwiftFormat"]),
|
||||
.plugin(name: "SwiftFormatPlugin", targets: ["SwiftFormatPlugin"]),
|
||||
],
|
||||
targets: [
|
||||
.executableTarget(
|
||||
name: "CommandLineTool", dependencies: ["SwiftFormat"], path: "CommandLineTool",
|
||||
exclude: ["swiftformat"]
|
||||
),
|
||||
.target(name: "SwiftFormat", path: "Sources", exclude: ["Info.plist"]),
|
||||
.testTarget(
|
||||
name: "SwiftFormatTests",
|
||||
dependencies: ["SwiftFormat"],
|
||||
path: "Tests",
|
||||
exclude: ["GlobTest[5].txt"]
|
||||
),
|
||||
.plugin(
|
||||
name: "SwiftFormatPlugin",
|
||||
capability: .command(
|
||||
intent: .custom(
|
||||
verb: "swiftformat", description: "Formats Swift source files using SwiftFormat"
|
||||
),
|
||||
permissions: [
|
||||
.writeToPackageDirectory(reason: "This command reformats source files"),
|
||||
]
|
||||
),
|
||||
dependencies: [.target(name: "CommandLineTool")]
|
||||
),
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user