mirror of https://github.com/cirruslabs/tart.git
Reformat code idents and introduce the SwiftFormat linter (#339)
* Package.swift: add SwiftFormat Can be invoked with "swift package plugin swiftformat". * $ swift package plugin swiftformat * .cirrus.yml: run SwiftFormat * SwiftFormat: exclude Sources/tart/OCI/Reference/Generated
This commit is contained in:
parent
c27d4a089c
commit
ad9c3c661e
13
.cirrus.yml
13
.cirrus.yml
|
|
@ -22,6 +22,18 @@ task:
|
||||||
path: "integration-tests/pytest-junit.xml"
|
path: "integration-tests/pytest-junit.xml"
|
||||||
format: junit
|
format: junit
|
||||||
|
|
||||||
|
task:
|
||||||
|
name: Lint
|
||||||
|
alias: lint
|
||||||
|
macos_instance:
|
||||||
|
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
|
||||||
|
lint_script:
|
||||||
|
- swift package plugin --allow-writing-to-package-directory swiftformat --cache ignore --lint --report swiftformat.json .
|
||||||
|
always:
|
||||||
|
swiftformat_report_artifacts:
|
||||||
|
path: swiftformat.json
|
||||||
|
format: swiftformat
|
||||||
|
|
||||||
task:
|
task:
|
||||||
name: Build
|
name: Build
|
||||||
alias: build
|
alias: build
|
||||||
|
|
@ -37,6 +49,7 @@ task:
|
||||||
name: Release
|
name: Release
|
||||||
only_if: $CIRRUS_TAG != ''
|
only_if: $CIRRUS_TAG != ''
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- lint
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
macos_instance:
|
macos_instance:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
--disable all
|
||||||
|
--enable indent
|
||||||
|
--indent 2
|
||||||
|
--exclude Sources/tart/OCI/Reference/Generated
|
||||||
|
--swiftversion 5.7
|
||||||
|
|
@ -98,6 +98,15 @@
|
||||||
"revision" : "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
|
"revision" : "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
|
||||||
"version" : "6.3.1"
|
"version" : "6.3.1"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swiftformat",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/nicklockwood/SwiftFormat",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "7c7dd06554a5fc3f452f1d16a780a81a3be04bce",
|
||||||
|
"version" : "0.50.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version" : 2
|
"version" : 2
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ let package = Package(
|
||||||
.package(url: "https://github.com/sushichop/Puppy", from: "0.5.1"),
|
.package(url: "https://github.com/sushichop/Puppy", from: "0.5.1"),
|
||||||
.package(url: "https://github.com/antlr/antlr4", branch: "dev"),
|
.package(url: "https://github.com/antlr/antlr4", branch: "dev"),
|
||||||
.package(url: "https://github.com/apple/swift-atomics.git", .upToNextMajor(from: "1.0.0")),
|
.package(url: "https://github.com/apple/swift-atomics.git", .upToNextMajor(from: "1.0.0")),
|
||||||
|
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.50.4"),
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.executableTarget(name: "tart", dependencies: [
|
.executableTarget(name: "tart", dependencies: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue