Skip to content

Commit

Permalink
Add support for external repositories
Browse files Browse the repository at this point in the history
The lint rule hardcoded `@//` which meant that it could only come form the top-level repository.

I'm building a third party (external) repo with lint configs and it needs to reference the rule from the appropriate external repo.
  • Loading branch information
fzakaria authored and shs96c committed Aug 16, 2024
1 parent 19af5cc commit 17b0f06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lint/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_lint_config(linter_name, tags):
return None

if native.existing_rule("%s_%s" % (OVERRIDE_RULE_NAME, linter_name)) != None:
return Label("@//%s:%s_%s" % (native.package_name(), OVERRIDE_RULE_NAME, linter_name))
return Label("@%s//%s:%s_%s" % (native.repo_name(), native.package_name(), OVERRIDE_RULE_NAME, linter_name))

if linter_name in configured_linters:
return Label("@apple_linters//:%s_%s" % (OVERRIDE_RULE_NAME, linter_name))
Expand Down

0 comments on commit 17b0f06

Please sign in to comment.