-
Notifications
You must be signed in to change notification settings - Fork 412
Add a script to automatically rustfmt
all required files
#3226
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
Add a script to automatically rustfmt
all required files
#3226
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3226 +/- ##
==========================================
+ Coverage 89.74% 90.07% +0.32%
==========================================
Files 122 122
Lines 101875 103449 +1574
Branches 101875 103449 +1574
==========================================
+ Hits 91429 93180 +1751
+ Misses 7761 7642 -119
+ Partials 2685 2627 -58 ☔ View full report in Codecov by Sentry. |
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.
LGTM.
I'm thinking it might be good to add a .githook directory to improve the development setup.
However, I am not sure if there has been any previous discussion regarding githooks that I am unaware of, so sorry if this review comment is redundant.
As we now require `rustfmt` pass on a subset of our files, its helpful to have a script which will automatically format any required files so that contributors don't need to think too hard about it.
cb952da
to
0079ca8
Compare
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.
ACK cb952da
Note that running the script produces a bunch of changes. |
And thanks! |
You mean on latest git? It shouldn't..... |
Ah, the sort order is the problem. If you add this it fixes it (need to create the # Sort order is effected by locale. See `man sort`.
# > Set LC_ALL=C to get the traditional sort order that uses native byte values.
export LC_ALL=C |
Ah, oops, duh, thanks. |
#!/bin/bash | ||
set -eo pipefail | ||
|
||
export LC_ALL=C |
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.
nit: Could have copied the comment to annotate why we need this. Any case, no real blocker.
Thanks for doing this one @TheBlueMatt, I did #3231 using it :) |
Thanks for complaining about it - it was an obvious oversight we should have had :) |
You welcome! Complaining is my specialty :) |
As we now require
rustfmt
pass on a subset of our files, its helpful to have a script which will automatically format any required files so that contributors don't need to think too hard about it.