Announcing Linting for Bazel
Blog post from Aspect Build
Aspect aims to enhance developer productivity in large-scale polyglot repositories using the Bazel build system, addressing a key missing feature: a lint command for code analysis. While Google's internal system, Tricorder, integrated linting with code review, Aspect has developed an open-source solution called rules_lint, offering a ruleset plugin for Bazel that simplifies formatting and linting processes. This tool supports various languages and integrates with Bazel's dependency graph using its aspect feature. The Aspect CLI, a replacement for the Bazel command-line interface, introduces the "aspect lint" command, which allows users to apply fixes suggested by linter tools interactively. Additionally, Aspect proposes rethinking lint as part of the code review process, using a bot named Marvin to present lint warnings as review comments, allowing developers and reviewers to decide on actions collaboratively without blocking progress. This approach provides a balanced system supporting both warnings and errors, and Aspect offers a free trial of their Workflows solution for Bazel CI/CD, which includes Marvin.