Skip to content

Add buildifier linting to CI and improve formatting documentation#7

Merged
chrisirhc merged 3 commits intomainfrom
claude/add-buildifier-lint-c4Gu5
Jan 29, 2026
Merged

Add buildifier linting to CI and improve formatting documentation#7
chrisirhc merged 3 commits intomainfrom
claude/add-buildifier-lint-c4Gu5

Conversation

@chrisirhc
Copy link
Copy Markdown
Owner

@chrisirhc chrisirhc commented Jan 29, 2026

Summary

  • Add buildifier formatting and linting to CI workflow using aspect_rules_lint
  • Configure format_multirun with lint mode following official docs
  • Upgrade aspect_rules_lint to 2.0.0
  • Add root alias for convenient bazel run //:format usage

Changes

CI Integration

  • Added buildifier check step that runs before build/test
  • Uses //tools/format:format.check which checks both formatting and lint warnings

Formatting Setup (tools/format/BUILD.bazel)

  • Uses format_multirun with starlark_fix_args = ["--lint=fix"] and starlark_check_args = ["--lint=warn"]
  • Follows the recommended pattern from aspect_rules_lint docs

Developer Experience

  • Added //:format alias in root BUILD.bazel for easy access
  • Updated DEVELOPMENT.md with usage instructions

Usage

# Format and fix lint issues
bazel run //:format

# Check without modifying (used in CI)
bazel run //tools/format:format.check

- Add buildifier check step to GitHub Actions CI workflow with lint_mode
- Configure buildifier targets in tools/format/BUILD.bazel:
  - //tools/format:buildifier - for fixing formatting and lint issues
  - //tools/format:buildifier.check - for CI checks (warns without modifying)
- Update DEVELOPMENT.md with comprehensive lint documentation

https://claude.ai/code/session_014vXCKU78Q6L4Ru68ogafN7
- Consolidate formatting and linting into format_multirun with
  starlark_fix_args and starlark_check_args for lint mode
- Add root alias for convenient `bazel run //:format` usage
- Update CI to use //tools/format:format.check as recommended
- Simplify documentation to reflect the unified approach

Reference: https://github.com/aspect-build/rules_lint/blob/main/docs/formatting.md

https://claude.ai/code/session_014vXCKU78Q6L4Ru68ogafN7
@chrisirhc chrisirhc merged commit 72ba213 into main Jan 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants