The README.bazel.md that is currently generated mentions the ability to use pre-commit to format code automatically on git commit.
With these changes, a .pre-commit-config.yaml is now generated that configures an 'aspect run format' hook out-of-the-box when users opt into formatting/linting.
Changes are visible to end-users: yes
Searched for relevant documentation and updated as needed: yes
Breaking change (forces users to change their own code or config): no
Suggested release notes appear below: yes
Suggested release notes
When generating a new project with linting/formatting enabled, a .pre-commit-config.yaml is now written that configures an aspect run format pre-commit hook.
Test plan
Manual testing:
Run aspect init, opting into auto-formatting
Run pre-commit install
git commit any file subject to auto-formatting (e.g. BUILD.bazel)
Observe the aspect-format pre-commit hook run before the commit is accepted:
The README.bazel.md that is currently generated mentions the ability to use pre-commit to format code automatically on git commit.
With these changes, a .pre-commit-config.yaml is now generated that configures an 'aspect run format' hook out-of-the-box when users opt into formatting/linting.
Changes are visible to end-users: yes
Suggested release notes
When generating a new project with linting/formatting enabled, a .pre-commit-config.yaml is now written that configures an
aspect run format
pre-commit hook.Test plan
aspect init
, opting into auto-formattingpre-commit install
git commit
any file subject to auto-formatting (e.g.BUILD.bazel
)