buildtools
buildtools copied to clipboard
build.Format should position a package() after load()s and before other rules
The current Rewriter implementation does not have any logic to ensure the order of a BUILD.bazel file that contains a package() rule is correct. According to the documentation for the package function a BUILD.bazel file should be ordered as:
- All
load()s, to the extent that any exists - A single
package(), if one exists - All rules
An additional rewrite rule could enforce this.