Skip to content

[buildifier] Bug: Possible false positive with canonical-repository on targets starting with @@// #1492

Description

@Ahajha

If you have a target //foo:bar in your main repo, and want to refer to it from an external repo, the only way (AFAIK) to do this is @@//foo:bar. canonical-repository flags this, but I don't think this provides any value, as the intent is to avoid actual fragile strings such as @@protobuf~5.27.0. The only thing this could possibly catch in this case is that the @@ may be redundant.

Coupled with #1391, I think the logic should flag on any string with @@ and // in it, except for any string with @@// in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions