-
Notifications
You must be signed in to change notification settings - Fork 248
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
chore: more precommit hooks #1325
Merged
jsharpe
merged 10 commits into
bazel-contrib:main
from
jjmaestro:chore-more-precommit-hooks
Nov 27, 2024
Merged
chore: more precommit hooks #1325
jsharpe
merged 10 commits into
bazel-contrib:main
from
jjmaestro:chore-more-precommit-hooks
Nov 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ah, forgot to double-check tests locally :S The |
jjmaestro
force-pushed
the
chore-more-precommit-hooks
branch
from
November 19, 2024 11:58
445ed20
to
7e5e93e
Compare
I broke the patch when changing the URLs because the change was done in a context line that doesn't exist in the real branch.
Update to docs patches so that they all build with the stardoc from main. NOTE: I used this gist to generate and test these patches: https://gist.github.com/jjmaestro/8f42d1ea04988ca86011de427b245ceb
* Add pre-commit linting and validation * Auto-generate the strategy matrix * Move Bazelisk and mdBook versions to `env` so that it's easier to test and upgrade to new versions. * `fail-fast: false` so that when one of the matrix jobs fails so that we can see failures for all of the jobs (easier to debug and the jobs are lightweight so it's not too costly). * Simplify the patching of old branches * Make steps easier to read, shortening lines and adding whitespace
jjmaestro
force-pushed
the
chore-more-precommit-hooks
branch
from
November 20, 2024 16:20
7e5e93e
to
e8206b0
Compare
* Some basic hooks to prevent usual whitespace nits (mixed line endings, trailing whitespace and missing EOF) and merge conflicts * Lint and validate all YAML (actions) and GH Actions (two validators because they are both quite useful for different reasons!) * Also validate shell scripts and Makefiles (NOTE: one of the GH Action validators also shellchecks the scripts in them :) * Finally, skip checks on bazel-* directories, generated files (diff/patches and generated files used as expected output in tests).
Automatic linting of all the files. Also, commit with --no-verify because there's still a bunch of things that require manual fixing.
There's a lot of stuff reported so excluding it from the time being, will probably create a separate PR just for this.
jjmaestro
force-pushed
the
chore-more-precommit-hooks
branch
from
November 20, 2024 17:26
e8206b0
to
c296c51
Compare
jsharpe
approved these changes
Nov 26, 2024
Sigh, more download issues in CI.. Seems the python.org download site has some bad permissions at the moment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Stacked on top of #1327
Here's a bit of a winter house cleaning :)
Add a bunch of pre-commit hooks:
Then, run
pre-commit run --all-files
to lint and fix the things that can be automatically fixed.Finally, a few more commits to fix the stuff that can't be fixed manually:
examples/
because there's quite a bunch of warnings so it's probably better to leave those for another PR.