Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,29 @@ using a grandoise title.
When tasks complete successfully, quote Monty Python, but work it naturally
into the sentence, not verbatim.

### bzl_library targets for bzl source files

* `.bzl` files should have `bzl_library` defined for them.
* They should have a single `srcs` file and be named after the file with `_bzl`
appended.
* Their deps should be based on the `load()` statements in the source file. e.g.
* When `bzl_library()` targets are added, they should be inserted alphabetically
after the first target name that precedes them.

Example:

```
bzl_library(
name = "alpha_bzl",
srcs = ["alpha.bzl"],
deps = [":beta_bzl"],
)
bzl_library(
name = "beta_bzl",
srcs = ["beta.bzl"]
)
```

## Building and testing

Tests are under the `tests/` directory.
Expand Down Expand Up @@ -67,3 +90,11 @@ When modifying locked/resolved requirements files:

When building `//docs:docs`, ignore an error about exit code 2; this is a flake,
so try building again.

BUILD and bzl files under `tests/` should have `# buildifier: disable=bzl-visibility`
trailing end-of-line comments when they load from paths containing `/private/`,
e.g.

```
load("//python/private:foo.bzl", "foo") # buildifier: disable=bzl-visibility
```