Update SwiftSyntax & internal parser for Swift 5.7 (#4203)
Require Swift 5.7 to compile
This commit is contained in:
parent
c6eec8072c
commit
fd7afedfcf
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
#### Breaking
|
#### Breaking
|
||||||
|
|
||||||
|
* SwiftLint now requires Swift 5.7 or higher to build.
|
||||||
|
[JP Simard](https://github.com/jpsim)
|
||||||
|
|
||||||
* Exclude `weak_delegate` rule from autocorrection due to behavioral changes
|
* Exclude `weak_delegate` rule from autocorrection due to behavioral changes
|
||||||
leading to potential undefined behavior or bugs.
|
leading to potential undefined behavior or bugs.
|
||||||
[SimplyDanny](https://github.com/SimplyDanny)
|
[SimplyDanny](https://github.com/SimplyDanny)
|
||||||
|
@ -75,6 +78,10 @@
|
||||||
[SimplyDanny](https://github.com/SimplyDanny)
|
[SimplyDanny](https://github.com/SimplyDanny)
|
||||||
[#4202](https://github.com/realm/SwiftLint/issues/4202)
|
[#4202](https://github.com/realm/SwiftLint/issues/4202)
|
||||||
|
|
||||||
|
* SwiftSyntax libraries were updated to their 5.7 releases, improving how newer
|
||||||
|
Swift language features are handled.
|
||||||
|
[JP Simard](https://github.com/jpims)
|
||||||
|
|
||||||
#### Bug Fixes
|
#### Bug Fixes
|
||||||
|
|
||||||
* Respect `validates_start_with_lowercase` option when linting function names.
|
* Respect `validates_start_with_lowercase` option when linting function names.
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
|
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "df9ee6676cd5b3bf5b330ec7568a5644f547201b",
|
"revision": "9f39744e025c7d377987f30b03770805dcb0bcd1",
|
||||||
"version": "1.1.3"
|
"version": "1.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -33,8 +33,8 @@
|
||||||
"repositoryURL": "https://github.com/apple/swift-syntax.git",
|
"repositoryURL": "https://github.com/apple/swift-syntax.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "0b6c22b97f8e9320bca62e82cdbee601cf37ad3f",
|
"revision": "04d4497be6b88e524a71778d828790e9589ae1c4",
|
||||||
"version": "0.50600.1"
|
"version": "0.50700.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,7 +28,7 @@ let package = Package(
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(name: "swift-argument-parser", url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.3")),
|
.package(name: "swift-argument-parser", url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.3")),
|
||||||
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50600.1")),
|
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50700.0")),
|
||||||
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.33.0"),
|
.package(url: "https://github.com/jpsim/SourceKitten.git", from: "0.33.0"),
|
||||||
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.1"),
|
.package(url: "https://github.com/jpsim/Yams.git", from: "5.0.1"),
|
||||||
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
|
.package(url: "https://github.com/scottrhoyt/SwiftyTextTable.git", from: "0.9.0"),
|
||||||
|
@ -63,7 +63,7 @@ let package = Package(
|
||||||
),
|
),
|
||||||
] + (staticSwiftSyntax ? [.binaryTarget(
|
] + (staticSwiftSyntax ? [.binaryTarget(
|
||||||
name: "lib_InternalSwiftSyntaxParser",
|
name: "lib_InternalSwiftSyntaxParser",
|
||||||
url: "https://github.com/keith/StaticInternalSwiftSyntaxParser/releases/download/5.6/lib_InternalSwiftSyntaxParser.xcframework.zip",
|
url: "https://github.com/keith/StaticInternalSwiftSyntaxParser/releases/download/5.7/lib_InternalSwiftSyntaxParser.xcframework.zip",
|
||||||
checksum: "88d748f76ec45880a8250438bd68e5d6ba716c8042f520998a438db87083ae9d"
|
checksum: "99803975d10b2664fc37cc223a39b4e37fe3c79d3d6a2c44432007206d49db15"
|
||||||
)] : [])
|
)] : [])
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,8 +19,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 10
|
maxParallel: 10
|
||||||
matrix:
|
matrix:
|
||||||
swift56:
|
swift57:
|
||||||
containerImage: swift:5.6
|
containerImage: swift:5.7
|
||||||
container: $[ variables['containerImage'] ]
|
container: $[ variables['containerImage'] ]
|
||||||
steps:
|
steps:
|
||||||
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
|
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
|
||||||
|
@ -32,8 +32,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 10
|
maxParallel: 10
|
||||||
matrix:
|
matrix:
|
||||||
xcode1341:
|
xcode14:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
sw_vers
|
sw_vers
|
||||||
|
@ -48,8 +48,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
maxParallel: 10
|
maxParallel: 10
|
||||||
matrix:
|
matrix:
|
||||||
xcode1341:
|
xcode14:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
sw_vers
|
sw_vers
|
||||||
|
@ -57,11 +57,11 @@ jobs:
|
||||||
displayName: Version Informations
|
displayName: Version Informations
|
||||||
- script: swift test --parallel --enable-code-coverage -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
|
- script: swift test --parallel --enable-code-coverage -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
|
||||||
displayName: swift test
|
displayName: swift test
|
||||||
- script: |
|
# - script: |
|
||||||
xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
# xcrun llvm-cov export -format="lcov" .build/debug/SwiftLintPackageTests.xctest/Contents/MacOS/SwiftLintPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
|
||||||
bash <(curl -s https://codecov.io/bash)
|
# bash <(curl -s https://codecov.io/bash)
|
||||||
displayName: Upload code coverage
|
# displayName: Upload code coverage
|
||||||
condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_13.2.1.app')
|
# condition: eq(variables['DEVELOPER_DIR'], '/Applications/Xcode_14.0.1.app')
|
||||||
|
|
||||||
- job: CocoaPods
|
- job: CocoaPods
|
||||||
pool:
|
pool:
|
||||||
|
@ -80,7 +80,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-12'
|
vmImage: 'macOS-12'
|
||||||
variables:
|
variables:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.12.2/bazelisk-darwin-amd64 -o bazelisk
|
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.12.2/bazelisk-darwin-amd64 -o bazelisk
|
||||||
|
@ -101,7 +101,7 @@ jobs:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-12'
|
vmImage: 'macOS-12'
|
||||||
variables:
|
variables:
|
||||||
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app
|
||||||
steps:
|
steps:
|
||||||
- script: swift run swiftlint generate-docs
|
- script: swift run swiftlint generate-docs
|
||||||
displayName: Run swiftlint generate-docs
|
displayName: Run swiftlint generate-docs
|
||||||
|
|
|
@ -19,9 +19,9 @@ def swiftlint_repos():
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "com_github_keith_swift_syntax_bazel",
|
name = "com_github_keith_swift_syntax_bazel",
|
||||||
sha256 = "f83b8449f84e29d263d2b0ceb9d2ae7f88c9f2a81f4b10035e94073664507507",
|
sha256 = "ca7f3a8099e4e7a454f45abea1ededabe209d9f6964df87566a142e3b281fe24",
|
||||||
strip_prefix = "swift-syntax-bazel-13.3.13E113",
|
strip_prefix = "swift-syntax-bazel-14.0.0.14A309",
|
||||||
url = "https://github.com/keith/swift-syntax-bazel/archive/refs/tags/13.3.13E113.tar.gz",
|
url = "https://github.com/keith/swift-syntax-bazel/archive/refs/tags/14.0.0.14A309.tar.gz",
|
||||||
)
|
)
|
||||||
|
|
||||||
http_archive(
|
http_archive(
|
||||||
|
|
Loading…
Reference in New Issue