buildtools icon indicating copy to clipboard operation
buildtools copied to clipboard

Stricter formatting of load statements

Open vladmos opened this issue 1 year ago • 0 comments

Remove the following linter warnings/fixes and make them part of the default formatting process:

  • load-on-top (moves all load statements to the top of a file)
  • same-origin-load (compresses load statements from the same source into one load statement)
  • out-of-order-load (sorts load statement lexicographically by their source but global imports have priority)

Formatted starlark files without active warnings of these categories will remain formatted. Files with the warnings will became non-formatted according to the new formatting rules.

For backward compatibility the following comments are still taken into account:

# buildifier: disable=load-on-top
# buildifier: disable=same-origin-load
# buildifier: disable=out-of-order-load

vladmos avatar Feb 15 '24 16:02 vladmos