thii / rules_swiftlint

Run SwiftLint in your Bazel build efficiently.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Fails to run SwiftLint validation alone for multiple targets

ra1028 opened this issue · comments

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?

  • Config
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
  • Command
bazel build --config=swiftlint_default //xxx/...
  • Error
(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

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?