bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

WIP: create an interface to allow for convention checking in gazelle #1900

Open tyler-french opened 1 month ago

tyler-french commented 1 month ago

Currently, at Uber, we do not use an index. Instead, we use conventions and a set of # gazelle:resolve statements in the root BUILD.bazel file.

This is beneficial because it means we can run Gazelle O(size change) instead of `O(size repo)'

This can be enabled by running bazel run //:gazelle -- --use_conventions with flag

Fixes #1907

tyler-french commented 1 month ago

@fmeum @linzhp still a draft, but let me know if you have any preliminary thoughts. Especially on how to make it more ubiquitous