Skip to content

Make "check-style.py --rewrite" allow to decide on the changes applied

Carlos Garnacho requested to merge wip/carlosg/update-check-style into master

This MR updates the check-style.py script back in sync with the changes that happened to it in Mutter, and changes the --rewrite option so that it allows deciding on the changes, from the last commit:

check-style: Allow deciding on individual suggestions with --rewrite

Currently, when the rewrite option is passed, the script does not give
much choice on whether changes should be applied or not, it just does
"git comit -a --amend". However, uncrustify is not always entirely
right about the proposed style changes, or it might suggest changes
in distant/unrelated bits in the changed functions. Thus the developer
needs to be given some option.

Change the approach of the --rewrite option, so that it first does
"git add -p", so that individual changes may be decided upon, and
after all the chunks were gone through, uses "git commit --squash"
so that the changes may be reviewed before manually doing
"git rebase --autosquash" to merge the changes.

Merge request reports