thii / rules_swiftlint

Run SwiftLint in your Bazel build efficiently.
MIT License
25 stars 0 forks source link

Error: Fails to run SwiftLint validation alone for multiple targets #4

Open ra1028 opened 1 year ago

ra1028 commented 1 year ago

When I try to run SwiftLint validation alone in the way described in README, I've got the following error. Are there any other ways?

build:swiftlint --aspects=@com_github_thii_rules_swiftlint//swiftlint:defs.bzl%swiftlint_aspect
build:swiftlint --output_groups=_validation

build:swiftlint_default --config=swiftlint
build:swiftlint_default --@com_github_thii_rules_swiftlint//swiftlint:config=//:swiftlint_config
bazel build --config=swiftlint_default //xxx/...
(18:38:57) ERROR: /Users/xxx/BUILD:x:x: Output group _validation provided twice
(18:38:57) ERROR: Analysis of aspects '[@com_github_thii_rules_swiftlint//swiftlint:defs.bzl%swiftlint_aspect] with parameters {} on //xxx:xxx' failed; build aborted: Output group _validation provided twice
thii commented 1 year ago

I can't reproduce this error. Can you provide a reproducible example? (You can use the example in this repo)

Also, since the error was Output group _validation provided twice, it seems because you also have another --output_groups=_validation flag set elsewhere that the swiftlint or swiftlint_default config inherits?