Skip to content

Addressed all buildifier warnings #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

UebelAndre
Copy link

This change applies buildifier auto-fixes for all available fixes and then in a second commit manually updates implementations to conform to the warning.

Additionally .buildifier.json has been added with the outputs of buildifier -config=example. Maintainers should remove anything there that offend them.

closes #358

@UebelAndre UebelAndre changed the title Addressed all buildifier lints Addressed all buildifier warnings Apr 27, 2025
@cloudhan
Copy link
Collaborator

please disable all those stylistic linting and revert all those style change.

@UebelAndre
Copy link
Author

If you can be specific about the warnings I can remove them but if this is still a controversial change I can close it out.

@cloudhan
Copy link
Collaborator

Is it possible to make it opt-in first then we gradually enable more of them?

Comment on lines +117 to +130

buildifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Buildifier
run: |
wget "https://github.com/bazelbuild/buildtools/releases/download/v${BUILDIFIER_VERSION}/buildifier-linux-amd64" -O buildifier
chmod +x ./buildifier
env:
BUILDIFIER_VERSION: 8.0.3
- name: Buildifier
run: |
./buildifier -lint=warn -mode=check -r ${{ github.workspace }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this project already uses pre-commit, I would suggest to add buildifier there. This way, users can easily run it locally and it gets executed in CI automatically. For this, simply add

  - repo: https://github.com/Warchant/pre-commit-buildifier
    rev: 0.1.5
    hooks:
      - id: buildifier
        args: [--version, "v8.2.0"]
      - id: buildifier-lint
        args: [--version, "v8.2.0"]

to the pre-commit-config.yaml

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.

Enable buildifier
3 participants