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.
If you have a target
//foo:barin your main repo, and want to refer to it from an external repo, the only way (AFAIK) to do this is@@//foo:bar.canonical-repositoryflags 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.