diff --git a/BUILD b/BUILD index 9dd4eacfe..fdcb79557 100644 --- a/BUILD +++ b/BUILD @@ -150,7 +150,7 @@ swift_binary( name = "swiftlint", package_name = "SwiftLint", srcs = glob(["Source/swiftlint/**/*.swift"]), - copts = copts, + copts = copts + strict_concurrency_copts, visibility = ["//visibility:public"], deps = [ ":SwiftLintFramework", diff --git a/Package.swift b/Package.swift index 0dfcc60a6..37a7f3fbe 100644 --- a/Package.swift +++ b/Package.swift @@ -9,6 +9,7 @@ let swiftFeatures: [SwiftSetting] = [ .enableUpcomingFeature("ForwardTrailingClosures"), .enableUpcomingFeature("ImplicitOpenExistentials"), ] +let strictConcurrency = [SwiftSetting.enableExperimentalFeature("StrictConcurrency")] let swiftLintPluginDependencies: [Target.Dependency] @@ -55,7 +56,7 @@ let package = Package( "SwiftLintFramework", "SwiftyTextTable", ], - swiftSettings: swiftFeatures + swiftSettings: swiftFeatures + strictConcurrency ), .testTarget( name: "CLITests", @@ -88,7 +89,8 @@ let package = Package( ), .target( name: "SwiftLintExtraRules", - dependencies: ["SwiftLintCore"] + dependencies: ["SwiftLintCore"], + swiftSettings: strictConcurrency ), .target( name: "SwiftLintFramework", @@ -100,7 +102,7 @@ let package = Package( .product(name: "ArgumentParser", package: "swift-argument-parser"), "CollectionConcurrencyKit", ], - swiftSettings: swiftFeatures + swiftSettings: swiftFeatures + strictConcurrency ), .target(name: "DyldWarningWorkaround"), .target( @@ -155,7 +157,7 @@ let package = Package( .product(name: "SwiftCompilerPlugin", package: "swift-syntax"), ], path: "Source/SwiftLintCoreMacros", - swiftSettings: swiftFeatures + swiftSettings: swiftFeatures + strictConcurrency ), .testTarget( name: "MacroTests", diff --git a/Source/SwiftLintCore/Models/Issue.swift b/Source/SwiftLintCore/Models/Issue.swift index bdb9fbfe9..0954bac83 100644 --- a/Source/SwiftLintCore/Models/Issue.swift +++ b/Source/SwiftLintCore/Models/Issue.swift @@ -75,7 +75,7 @@ public enum Issue: LocalizedError, Equatable { case baselineNotReadable(path: String) /// Flag to enable warnings for deprecations being printed to the console. Printing is enabled by default. - public static var printDeprecationWarnings = true + package nonisolated(unsafe) static var printDeprecationWarnings = true /// Hook used to capture all messages normally printed to stdout and return them back to the caller. /// diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6fc1eb3f1..3ec912591 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,9 +19,6 @@ jobs: strategy: maxParallel: 10 matrix: - '13': - image: 'macOS-13' - xcode: '15.2' '14': image: 'macOS-14' xcode: '15.4'