-
Notifications
You must be signed in to change notification settings - Fork 39
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
Reformat #1218
Reformat #1218
Conversation
Now that the release is together, I rebased the reformat here. Short of adding CI to verify it, which might accidentally work because it's in the format script now that I think about it, this should be good to go. |
78b80b1
to
a24d061
Compare
@milroy, what do you think of just getting this in? I've rebased and reapplied the formatting. I've also created a pull request to your rank-based-partial-release branch with a rebase of your branch on top of this with the reformatting applied to every commit to preserve all your changes. If you have new changes that aren't in there, or just want to do it yourself, this script completely automates it assuming you have fetched my reformat branch and are currently on your "partial-release" branch, or any other branch for that matter: export BEFORE_MASS_FORMAT=af44d3b53457240d511bd2a32a3485fbdb91246d
export MASS_FORMAT=78b80b195bc36186abb438f499adbee5bef4a025
git rebase \
--strategy-option theirs \
--empty=drop \
--exec "$(echo './scripts/format' \
'|| echo prettier failed its ok; ' \
'git commit -a --amend --no-verify --no-edit' \
)" \
--onto $MASS_FORMAT $BEFORE_MASS_FORMAT; This is also now enforced in CI in this PR. |
8b8e34e
to
ffb487f
Compare
Apologies if anyone looked at this during the churn after the last comment. Had to switch our format infrastructure to use pre-commit like core does to ensure we get consistent versions and avoid formatting differences from that. Now all straightened up, and using clang-format 18.1.6. |
Reminder to self: When we're ready to pull the trigger here, I need to change the name of the action in the branch protection rules so this and other PRs with the new name can pass. |
Sorry for the delay. I'll review this PR tonight. |
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.
This will be very helpful for the long-term maintenance of Fluxion.
Let's get it merged.
Thanks a lot for providing an automated way to update my PR. I've made a few changes to the branch so I I'll run the command myself. |
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 noticed two things that could maybe be squashed out of existence. Otherwise looks great. I'm wondering whether it needs to be merged manually since it expects the 'python format' action which has been renamed? In which case I'm happy to do that
6e849da
to
095dadd
Compare
problem: we were special-casing pack and unpack functions to prevent them from being formatted solution: stop special-casing them
problem: we don't automatically check c/c++ formatting on push solution: add clang-format to the check-format script I also renamed "python formatting" to "code formatting" here so that would stay accurate
problem: we spend a lot of time on code formatting, and have a somewhat inconsistent style solution: automate it with clang-format
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1218 +/- ##
=======================================
Coverage 74.3% 74.4%
=======================================
Files 104 104
Lines 15184 14936 -248
=======================================
- Hits 11295 11118 -177
+ Misses 3889 3818 -71
|
Two small tweaks to add this to the format script and remove the special-casing for pack/unpack, then apply formatting. Once we're happy with this, I intend to add a .git-ignore-revs or similar file we can use to ignore the global reformat commit in blame, but it has to have the commit sha in full in the file.