File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,16 @@ into the sentence, not verbatim.
2121
2222### bzl_library targets for bzl source files
2323
24- * ` .bzl ` files should have ` bzl_library ` defined for them.
24+ * A ` bzl_library ` target should be defined for every ` .bzl ` file outside
25+ of the ` tests/ ` directory.
2526* They should have a single ` srcs ` file and be named after the file with ` _bzl `
2627 appended.
27- * Their deps should be based on the ` load() ` statements in the source file.
28+ * Their deps should be based on the ` load() ` statements in the source file
29+ and refer to the ` bzl_library ` target containing the loaded file.
30+ * For files in rules_python: replace ` .bzl ` with ` _bzl ` .
31+ e.g. given ` load("//foo:bar.bzl", ...) ` , the target is ` //foo:bar_bzl ` .
32+ * For files outside rules_python: remove the ` .bzl ` suffix. e.g. given
33+ ` load("@foo//foo:bar.bzl", ...) ` , the target is ` @foo//foo:bar ` .
2834* ` bzl_library() ` targets should be kept in alphabetical order by name.
2935
3036Example:
You can’t perform that action at this time.
0 commit comments