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
[Merged by Bors] - feat(scripts/lint_mathlib): implement github annotations for mathlib linters #11345
Conversation
bors d+ |
✌️ alexjbest can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
👎 Rejected by label |
bors r+ |
Pull request successfully merged into master. Build succeeded: |
@@ -153,7 +153,7 @@ jobs: | |||
- name: lint | |||
run: | | |||
./scripts/mk_all.sh | |||
lean --run scripts/lint_mathlib.lean | |||
lean --run scripts/lint_mathlib.lean --github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, you changed the wrong file here. There's a big warning on top:
# DO NOT EDIT THIS FILE!!!
# This file is automatically generated by mk_build_yml.sh
# Edit build.yml.in instead and run mk_build_yml.sh to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, I've seen this warning before but totally missed it this time. I'll fix this tonight or tomorrow if nobody beats me to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexjbest it looks like it's fixed in #11645, which I'll put on the queue shortly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Do either of you have an easy to implement way to prevent this sort of thing happening again?
E.g. a check in CI that the workflow files are the same as those generated from the .in file? How hard would that be to check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That shouldn't be too hard. I believe a ./.github/workflows/mk_build_yml.sh && git diff --exit-code .github
should do the trick.
Resolves the last part of #5863
This causes
lean --run lint_mathlib --github
to produce error messages understood by github actions, which will tag the lines causing linter failures with annotations in the files changed tab