Compare commits

...

2 Commits

Author SHA1 Message Date
JP Simard 1cbe8c8f98
Use custom schemes 2022-08-15 15:22:56 -04:00
JP Simard 7cbef3a273
Integrate with rules_xcodeproj 2022-08-15 15:15:09 -04:00
4 changed files with 33 additions and 1 deletions

1
.gitignore vendored
View File

@ -37,6 +37,7 @@ xcuserdata
# SwiftLint
SwiftLint.xcodeproj
SwiftLint.pkg
*.zip
benchmark_*

19
BUILD
View File

@ -3,6 +3,11 @@ load(
"swift_binary",
"swift_library",
)
load(
"@com_github_buildbuddy_io_rules_xcodeproj//xcodeproj:xcodeproj.bzl",
"xcode_schemes",
"xcodeproj",
)
swift_library(
name = "SwiftLintFramework",
@ -46,3 +51,17 @@ filegroup(
srcs = glob(["Source/**"]),
visibility = ["//Tests:__subpackages__"],
)
xcodeproj(
name = "xcodeproj",
build_mode = "bazel",
project_name = "SwiftLint",
schemes = [
xcode_schemes.scheme(
name = "SwiftLint",
launch_action = xcode_schemes.launch_action("//:swiftlint"),
build_action = xcode_schemes.build_action(["//:swiftlint"]),
test_action = xcode_schemes.test_action(["//Tests:SwiftLintFrameworkTests"]),
),
]
)

View File

@ -27,7 +27,7 @@ swift_test(
# Bazel doesn't support paths with spaces in them
exclude = ["SwiftLintFrameworkTests/Resources/FileNameNoSpaceRuleFixtures/**"],
),
visibility = ["//Tests:__subpackages__"],
visibility = ["//visibility:public"],
deps = [":SwiftLintFrameworkTests.library"],
)

View File

@ -36,3 +36,15 @@ swiftlint_repos()
load("//bazel:deps.bzl", "swiftlint_deps")
swiftlint_deps()
http_archive(
name = "com_github_buildbuddy_io_rules_xcodeproj",
sha256 = "1bfc8589398afc31c47c3cb402f848c89ea11f8992c3f1c8e93efafa23619a7f",
# https://github.com/buildbuddy-io/rules_xcodeproj/pull/900
strip_prefix = "rules_xcodeproj-da3c32c91653cd98d4cb0bb7ffe9ac81a6f5f800",
url = "https://github.com/buildbuddy-io/rules_xcodeproj/archive/da3c32c91653cd98d4cb0bb7ffe9ac81a6f5f800.tar.gz",
)
load("@com_github_buildbuddy_io_rules_xcodeproj//xcodeproj:repositories.bzl", "xcodeproj_rules_dependencies")
xcodeproj_rules_dependencies()