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

bzlint #341

Closed
laurentlb opened this Issue Jul 19, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@laurentlb
Copy link
Collaborator

laurentlb commented Jul 19, 2018

We have a plan to create a new tool, called bzlint. It should act as a linter and a code fixer.

bzlint tools/*.bzl reports warnings in the bzl files
bzlint --fix tools/*.bzl applies fixes to bzl files

An example of fix is to remove unused load() arguments, but we can expect many other fixes.

@philipjameson

This comment has been minimized.

Copy link

philipjameson commented Sep 28, 2018

What's the rationale for not integrating this into buildifier? It seems less than ideal to have to have multiple tools to lint build-related files. Also, is there ongoing design somewhere for this?

@laurentlb

This comment has been minimized.

Copy link
Collaborator

laurentlb commented Sep 28, 2018

Good question.
We could have buildifier --warn and buildifier --fix (by default, buildifier should only reformat the file, not apply the possibly unsafe changes). What do you think, Vlad?

@vladmos

This comment has been minimized.

Copy link
Member

vladmos commented Nov 15, 2018

Bzlint is available as a part of buildifier: https://github.com/bazelbuild/buildtools/tree/master/buildifier#linter

@vladmos vladmos closed this Nov 15, 2018

@laurentlb

This comment has been minimized.

Copy link
Collaborator

laurentlb commented Nov 15, 2018

... and thanks Philip for the suggestion!
It's probably simpler for users to have a single binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment