use swiftformat plugin to run formatter

This commit is contained in:
Satindar Dhillon
2024-01-20 08:18:42 -08:00
parent fb1d8331a4
commit 17bae460b4
4 changed files with 11 additions and 4 deletions

View File

@ -5,7 +5,6 @@ let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_11)],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.48.11"),
.package(url: "https://github.com/realm/SwiftLint", from: "0.44.0"),
.package(url: "https://github.com/maticzav/swift-graphql", from: "2.2.1")
],

View File

@ -830,6 +830,7 @@
packageReferences = (
0418837C2742E99F003E0001 /* XCRemoteSwiftPackageReference "intercom-ios" */,
048F592A2790EAF800E0B494 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
04B616992B5C296700128513 /* XCRemoteSwiftPackageReference "SwiftFormat" */,
);
productRefGroup = E601FA26367162479B614F0F /* Products */;
projectDirPath = "";
@ -2053,6 +2054,14 @@
minimumVersion = 8.0.0;
};
};
04B616992B5C296700128513 /* XCRemoteSwiftPackageReference "SwiftFormat" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/nicklockwood/SwiftFormat";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.53.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */

View File

@ -248,8 +248,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/nicklockwood/SwiftFormat",
"state" : {
"revision" : "872e7034f54aeee3f20acf790ecc13e1383f7360",
"version" : "0.48.4"
"revision" : "fef156a6135e584985ed26713dd2e9ee41f952cb",
"version" : "0.53.0"
}
},
{

View File

@ -1,5 +1,4 @@
cd BuildTools
SDKROOT=(xcrun --sdk macosx --show-sdk-path)
# swift package update #Uncomment this line temporarily to update the version used to the latest matching your BuildTools/Package.swift file
swift run -c release swiftformat "$SRCROOT"
swift run swiftlint --path "$SRCROOT"