-
Notifications
You must be signed in to change notification settings - Fork 434
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
Update pre commit hooks to check spelling and lint-fix on pre commit #5440
Update pre commit hooks to check spelling and lint-fix on pre commit #5440
Conversation
This commit moves the pre-commit hook for spellcheck from pre-push to pre-commit. Signed-off-by: Bryan Cox <[email protected]>
Hey @nawazkh 👋🏻 - I can't remember if we put the spellcheck on pre-push for some reason previously but this PR moves it to pre-commit so those are caught up front. I also added |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5440 +/- ##
=======================================
Coverage 52.41% 52.41%
=======================================
Files 272 272
Lines 29361 29361
=======================================
Hits 15390 15390
Misses 13165 13165
Partials 806 806 ☔ View full report in Codecov by Sentry. |
A welcome change imo. Whats the total time to completion you see upon adding these two additional stages to pre-commit ? |
Whoops I meant to add I did a quick test of 3 commits without the PR and 3 commits with the PR. It's about 6 seconds slower with the PR. The average times were:
|
.pre-commit-config.yaml
Outdated
- id: make-verify-codespell | ||
name: Run make verify-codespell | ||
entry: make verify-codespell | ||
stages: [ pre-commit ] | ||
language: system | ||
require_serial: true |
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.
What do you say if we move make verify-codespell
to pre-push
stage ?
I would love to keep the git commit
time to be as short as possible.
Besides, we do run all the verify tests as part of a job. Reference conversation: #5213
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.
Sure, the removed a second off the time.
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.
Change has been pushed
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.
I tested make verify-lint
in my local and it took the system 2m 24s
to complete it.
What do you say to moving verify-lint
to pre-push stage as well? Since verify-lint is not commit restricted, it should still check the linter-errors in complete changes.
Sorry, not trying to be a bum about this 😶🌫️ I am quite inclined on having faster commit times.
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.
Wow 2m 🤯
Sure I can move it to pre-push.
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.
Updated
c2ca0c4
to
4adcd14
Compare
This commit adds make lint-fix to the pre-commit hook. Signed-off-by: Bryan Cox <[email protected]>
This commit adds make verify-codespell to the pre-commit hook. Signed-off-by: Bryan Cox <[email protected]>
4adcd14
to
30c0b16
Compare
Thank you Bryan! |
LGTM label has been added. Git tree hash: 111d2c9b87c66a703e92129ee05e2cf78c18080e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nawazkh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):N/A
Special notes for your reviewer:
TODOs:
Release note: