Skip to content
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

Adding linters to CI #78

Merged
merged 7 commits into from
Jul 17, 2024
Merged

Adding linters to CI #78

merged 7 commits into from
Jul 17, 2024

Conversation

manuelnaranjo
Copy link
Contributor

Introducing linters in CI, now we run both buildifier and gazelle during CI to make sure we have no pending changes

@manuelnaranjo manuelnaranjo marked this pull request as ready for review July 17, 2024 10:13
@manuelnaranjo
Copy link
Contributor Author

@rmohr this one is also ready, it will add 2 linters to the CI: buildifier and gazelle, but we could extend to go fmt later as well for instance. It will become faster once I add moving to bazel 7 and use prebuilt protoc

@rmohr
Copy link
Owner

rmohr commented Jul 17, 2024

LGTM. Needs a rebase tough, since I merged the CI improvements.

Adding a CI job that will help us keep the starlark files tidy
now most modules and methods are documented
We have a few cases where we want to warn the user about things, in
those cases we want the warning statement to happen
For some reason the linter recomends having a name argument, and also
making it explicit which are the required arguments to the methods
When adding toolchain we missed this
When mutating arrays the linter prefers to use extend/append instead of
+= to the existing array.

Also moving from arrays to ctx.actions.attr instead of arrays when
passing values into ctx.actions, this reduces the memory preassure during
the bazel analysis phase and delays it until the action graph gets
executed.
Now we have a gazelle check in CI as well as we have buildifier
@manuelnaranjo
Copy link
Contributor Author

@rmohr it's green now

@rmohr rmohr merged commit 8e27953 into rmohr:main Jul 17, 2024
5 checks passed
@manuelnaranjo manuelnaranjo deleted the mnaranjo/linters branch July 17, 2024 20:04
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