Skip to content

Commit ae388f9

Browse files
authored
Sort arguments according to their definition (#6204)
1 parent e7108ec commit ae388f9

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
22
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_universal_binary")
3+
load("@build_bazel_rules_shell//shell:sh_test.bzl", "sh_test")
34
load(
45
"@build_bazel_rules_swift//swift:swift.bzl",
56
"swift_binary",
@@ -8,7 +9,6 @@ load(
89
"universal_swift_compiler_plugin",
910
)
1011
load("@rules_cc//cc:cc_library.bzl", "cc_library")
11-
load("@build_bazel_rules_shell//shell:sh_test.bzl", "sh_test")
1212

1313
bool_flag(
1414
name = "universal_tools",

Tests/BUILD

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ strict_concurrency_copts = [
2121
"-Xfrontend",
2222
"-strict-concurrency=complete",
2323
]
24+
2425
targeted_concurrency_copts = [
2526
"-Xfrontend",
2627
"-strict-concurrency=targeted",
@@ -30,14 +31,14 @@ targeted_concurrency_copts = [
3031

3132
swift_library(
3233
name = "CLITests.library",
34+
package_name = "SwiftLint",
3335
testonly = True,
3436
srcs = glob(["CLITests/**/*.swift"]),
37+
copts = copts + strict_concurrency_copts,
3538
module_name = "CLITests",
36-
package_name = "SwiftLint",
3739
deps = [
3840
"//:SwiftLintFramework",
3941
],
40-
copts = copts + strict_concurrency_copts,
4142
)
4243

4344
swift_test(
@@ -52,12 +53,12 @@ swift_library(
5253
name = "MacroTests.library",
5354
testonly = True,
5455
srcs = glob(["MacroTests/**/*.swift"]),
56+
copts = copts + strict_concurrency_copts,
5557
module_name = "MacroTests",
5658
deps = [
5759
"//:SwiftLintCoreMacrosLib",
5860
"@SwiftSyntax//:SwiftSyntaxMacrosTestSupport_opt",
5961
],
60-
copts = copts + strict_concurrency_copts,
6162
)
6263

6364
swift_test(
@@ -70,20 +71,21 @@ swift_test(
7071

7172
swift_library(
7273
name = "TestHelpers",
74+
package_name = "SwiftLint",
7375
testonly = True,
7476
srcs = glob(["TestHelpers/**/*.swift"]),
77+
copts = copts + strict_concurrency_copts,
7578
module_name = "TestHelpers",
76-
package_name = "SwiftLint",
7779
deps = [
7880
"//:SwiftLintFramework",
7981
],
80-
copts = copts + strict_concurrency_copts,
8182
)
8283

8384
# BuiltInRulesTests
8485

8586
swift_library(
8687
name = "BuiltInRulesTests.library",
88+
package_name = "SwiftLint",
8789
testonly = True,
8890
srcs = glob(
8991
["BuiltInRulesTests/**/*.swift"],
@@ -93,12 +95,11 @@ swift_library(
9395
"BuiltInRulesTests/FileNameNoSpaceRuleTests.swift",
9496
],
9597
),
98+
copts = copts + strict_concurrency_copts,
9699
module_name = "BuiltInRulesTests",
97-
package_name = "SwiftLint",
98100
deps = [
99101
":TestHelpers",
100102
],
101-
copts = copts + strict_concurrency_copts,
102103
)
103104

104105
swift_test(
@@ -117,19 +118,19 @@ swift_test(
117118

118119
swift_library(
119120
name = "FrameworkTests.library",
121+
package_name = "SwiftLint",
120122
testonly = True,
121123
srcs = glob(
122124
["FrameworkTests/**/*.swift"],
123125
exclude = [
124126
"FrameworkTests/Resources/**",
125127
],
126128
),
129+
copts = copts + strict_concurrency_copts,
127130
module_name = "FrameworkTests",
128-
package_name = "SwiftLint",
129131
deps = [
130132
":TestHelpers",
131133
],
132-
copts = copts + strict_concurrency_copts,
133134
)
134135

135136
swift_test(
@@ -159,21 +160,21 @@ filegroup(
159160

160161
swift_library(
161162
name = "IntegrationTests.library",
163+
package_name = "SwiftLint",
162164
testonly = True,
163165
srcs = ["IntegrationTests/IntegrationTests.swift"],
166+
copts = copts + targeted_concurrency_copts, # Set to strict once SwiftLintFramework is updated
164167
module_name = "IntegrationTests",
165-
package_name = "SwiftLint",
166168
deps = [
167169
":TestHelpers",
168170
],
169-
copts = copts + targeted_concurrency_copts, # Set to strict once SwiftLintFramework is updated
170171
)
171172

172173
swift_test(
173174
name = "IntegrationTests",
174175
data = [
176+
"IntegrationTests/default_rule_configurations.yml",
175177
"//:LintInputs",
176-
"IntegrationTests/default_rule_configurations.yml"
177178
],
178179
visibility = ["//visibility:public"],
179180
deps = [":IntegrationTests.library"],
@@ -193,19 +194,19 @@ XCTMain([testCase(ExtraRulesTests.allTests)])" >> $(OUTS)
193194

194195
swift_library(
195196
name = "ExtraRulesTests.library",
197+
package_name = "SwiftLint",
196198
testonly = True,
197199
srcs = [
198200
"ExtraRulesTests/ExtraRulesTests.swift",
199201
] + select({
200202
"@platforms//os:linux": [":ExtraRulesLinuxMain"],
201203
"//conditions:default": [],
202204
}),
205+
copts = copts + strict_concurrency_copts,
203206
module_name = "ExtraRulesTests",
204-
package_name = "SwiftLint",
205207
deps = [
206208
":TestHelpers",
207209
],
208-
copts = copts + strict_concurrency_copts,
209210
)
210211

211212
swift_test(

0 commit comments

Comments
 (0)