Skip to content

Commit

Permalink
Run buildifier (#5319)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim authored Nov 1, 2023
1 parent 6dc4b86 commit 7086457
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,47 @@ load("@build_bazel_rules_apple//apple:apple.bzl", "apple_universal_binary")
load(
"@build_bazel_rules_swift//swift:swift.bzl",
"swift_binary",
"swift_compiler_plugin",
"swift_library",
"swift_compiler_plugin"
)

copts = ["-enable-upcoming-feature", "ExistentialAny"]
copts = [
"-enable-upcoming-feature",
"ExistentialAny",
]

# Targets

swift_library(
name = "SwiftLintCoreMacrosLib",
module_name = "SwiftLintCoreMacros",
srcs = glob(["Source/SwiftLintCoreMacros/*.swift"]),
copts = copts,
module_name = "SwiftLintCoreMacros",
visibility = ["//visibility:public"],
deps = [
"@SwiftSyntax//:SwiftCompilerPlugin_opt",
"@SwiftSyntax//:SwiftSyntaxMacros_opt",
],
copts = copts,
)

swift_compiler_plugin(
name = "SwiftLintCoreMacros",
srcs = glob(["Source/SwiftLintCoreMacros/*.swift"]),
copts = copts,
deps = [
"@SwiftSyntax//:SwiftCompilerPlugin_opt",
"@SwiftSyntax//:SwiftSyntaxMacros_opt",
],
copts = copts,
)

swift_library(
name = "SwiftLintCore",
srcs = glob(["Source/SwiftLintCore/**/*.swift"]),
copts = copts,
module_name = "SwiftLintCore",
plugins = [
":SwiftLintCoreMacros",
],
visibility = ["//visibility:public"],
deps = [
"@SwiftSyntax//:SwiftIDEUtils_opt",
Expand All @@ -50,21 +57,17 @@ swift_library(
"@platforms//os:linux": ["@com_github_krzyzanowskim_cryptoswift//:CryptoSwift"],
"//conditions:default": [":DyldWarningWorkaround"],
}),
plugins = [
":SwiftLintCoreMacros",
],
copts = copts,
)

swift_library(
name = "SwiftLintBuiltInRules",
srcs = glob(["Source/SwiftLintBuiltInRules/**/*.swift"]),
copts = copts,
module_name = "SwiftLintBuiltInRules",
visibility = ["//visibility:public"],
deps = [
":SwiftLintCore",
],
copts = copts,
)

swift_library(
Expand All @@ -85,19 +88,20 @@ swift_library(
srcs = glob(
["Source/SwiftLintFramework/**/*.swift"],
),
copts = copts,
module_name = "SwiftLintFramework",
visibility = ["//visibility:public"],
deps = [
":SwiftLintBuiltInRules",
":SwiftLintCore",
":SwiftLintExtraRules",
],
copts = copts,
)

swift_library(
name = "swiftlint.library",
srcs = glob(["Source/swiftlint/**/*.swift"]),
copts = copts,
module_name = "swiftlint",
visibility = ["//visibility:public"],
deps = [
Expand All @@ -106,16 +110,15 @@ swift_library(
"@sourcekitten_com_github_apple_swift_argument_parser//:ArgumentParser",
"@swiftlint_com_github_scottrhoyt_swifty_text_table//:SwiftyTextTable",
],
copts = copts,
)

swift_binary(
name = "swiftlint",
copts = copts,
visibility = ["//visibility:public"],
deps = [
":swiftlint.library",
],
copts = copts,
)

apple_universal_binary(
Expand Down

0 comments on commit 7086457

Please sign in to comment.