Add guideline: only use `name` for generated targets' names.
RELNOTES:
None
PiperOrigin-RevId: 242648715
diff --git a/site/docs/skylark/bzl-style.md b/site/docs/skylark/bzl-style.md
index 1d9fc82..e6f4839 100644
--- a/site/docs/skylark/bzl-style.md
+++ b/site/docs/skylark/bzl-style.md
@@ -133,6 +133,9 @@
* All other targets defined by a macro should have their names preceded with a
`_`, include the `name` attribute as a prefix, and have restricted
visibility.
+* The `name` should only be used to derive names of targets defined by the
+ macro, and not for anything else. For example, don't use the name to derive
+ a dependency or input file that is not generated by the macro itself.
* All the targets created in the macro should be coupled in some way to the
main target.
* Keep the parameter names in the macro consistent. If a parameter is passed