[haiku-commits] Re: r33824 - haiku/trunk/src/servers/app

  • From: Alexandre Deckner <alex@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 29 Oct 2009 14:50:05 +0100

PulkoMandy wrote:
And, now that we totally control our SVN environment, what about
setup
a commit hook script that run it to reject not compliant commits?

That won't work with foreign imported code, unfortunately.

If it's close to my vim script that served as a base for it, there may also be some false positives, like #include <path/file.h> handled like a / operator without spaces around. Having it as a commit hook would also lock you from updating already non-compliant code without fixing it first...


Yes, it also gives some false positives for stuff in comments, like e.g: the dash in "Copyright 2008-2009" although that might be easily fixable. But that's not that bad anyway, it doesn't have to be perfect, see it as a second compiler and as warnings to check by yourself. To ease the human parsing of the warnings and still stay editor independent it could simply produce an highlighted html version of the problematic sources.

As for automatic styling, i believe it's a difficult issue that would need semantic info. Fixing the problems yourself also helps to learn the style.

Btw, what about putting it in the repo?

Regards,
Alex



Other related posts: