[hipl-dev] Re: [Merge] lp:~stefan.goetz/hipl/style-check-hook-review into lp:hipl

  • From: Stefan Götz <stefan.goetz@xxxxxxxxxxxxxxxxx>
  • To: mp+45051@xxxxxxxxxxxxxxxxxx
  • Date: Thu, 06 Jan 2011 08:11:10 -0000

Review: Needs Information
I need some help on usability with this branch/hook. The hook runs after one 
enters the commit message and it simply aborts the commit if there are style 
violations.

Now assuming that that might happen quite often, this is a fairly obnoxious 
behavior because one cannot commit, is lectured on poor style, and also loses 
the commit message. On top, one needs to then run uncrustify manually (or edit 
the code manually).

Are there any opinions on how to handle this better? How about this:

If a style violation is found, the hook shows the diff between the actual code 
and its uncrustified version (as already happens now) and the hook asks the 
user whether they want their local code to be uncrustified that way. The commit 
needs to be aborted nevertheless, of course.

Any other ideas (note that the hook cannot modify the code to be committed, 
only the on-disk files)?

Any ideas on how to preserve the commit message? I thought bazaar would do this 
itself somehow (similar to SVN storing messages of failed commits in temporary 
files) but I did not find how. So maybe this commit hook could do just that.
-- 
https://code.launchpad.net/~stefan.goetz/hipl/style-check-hook-review/+merge/45051
Your team HIPL core team is subscribed to branch lp:hipl.

Other related posts: