-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile with
-strict-concurrency=complete
(#5320)
* Compile with `-strict-concurrency=complete` Only in Bazel for now, because this is considered an unsafe flag in SwiftPM which would lead to warnings for downstream consumers of SwiftLint using SwiftPM. Some imports of SwiftSyntax need the `@preconcurrency` annotation until swiftlang/swift-syntax#2322 is available in a release. The following SwiftLint libraries have `-strict-concurrency=complete` applied: * SwiftLintCoreMacros * SwiftLintBuiltInRules * SwiftLintExtraRules The following SwiftLint libraries don't have the flag applied and need to be migrated: * SwiftLintCore * swiftlint (CLI target) So really the rules and macros are now being compiled with `-strict-concurrency=complete`, but the core infrastructure of SwiftLint is not. Still, given that Swift 6 will eventually make these warnings errors by default, it's good to prevent issues from creeping in earlier rather than later. * Add CI job to build with strict concurrency
- Loading branch information
Showing
17 changed files
with
56 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Source/SwiftLintBuiltInRules/Rules/Lint/UnusedClosureParameterRule.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
files=( | ||
"Source/SwiftLintBuiltInRules/Rules/Idiomatic/PrivateOverFilePrivateRule.swift" | ||
"Source/SwiftLintBuiltInRules/Rules/Idiomatic/ToggleBoolRule.swift" | ||
"Source/SwiftLintBuiltInRules/Rules/Style/EmptyEnumArgumentsRule.swift" | ||
"Source/SwiftLintBuiltInRules/Rules/Style/OptionalEnumCaseMatchingRule.swift" | ||
"Source/SwiftLintBuiltInRules/Rules/Style/TrailingCommaRule.swift" | ||
) | ||
|
||
for file in "${files[@]}"; do | ||
sed -i '' -e 's/import SwiftSyntax$/@preconcurrency import SwiftSyntax/g' "$file" | ||
done |