[Development] White space / coding style patches welcome?
Oswald Buddenhagen
oswald.buddenhagen at digia.com
Wed Mar 13 10:30:08 CET 2013
On Wed, Mar 13, 2013 at 01:38:31AM +0100, Axel Waggershauser wrote:
> I'd say in terms of Lars's worries about having automatic checks in
> place before attacking whitespace issues, there should not be any
> objection against fixing at least those 4 issues immediately.
> One might ask, though, if it would be a good idea to actually enforce
> the checks instead of merely letting the Sanity Bot warn about them?
>
actual enforcement was lars' request.
but this clearly requires a very low false report rate to be accepted.
> Or maybe to account for the very last line of the coding style wiki:
> "Feel free to break a rule if it makes your code look bad."?
>
in my experience, this escape rule applies mostly to rules that are way
too complex for the sanity checker anyway, so there is no practical
conflict with enforcing the simple rules.
> I had a look at the statistics (ignoring both 3rdparty and auto
> generated files): about 2k lines in qtbase suffer from trailing
> whitespace and about 3k from leading tabs (of which more than 1k are
> from two files in tests/auto alone). Interestingly, the overlap of
> those two issues is about 10 lines only.
>
interesting. i remember a much higher overlap. but this may have been in
the qt3support module, which was simply deleted.
> Given that the trailing ws issue is very easily fixed by a one-liner
> as Corentin has used and that the overlap with the tab issue is so
> small, I suggest to fix all those 2k lines of trailing whitespace
> adding the couple tab-fixes manually, so the sanity bot is happy, and
> commit that in one go.
>
> Then in a second step deal with tabs and maybe other ws issues, that
> require manual intervention in smaller chunks.
>
ok, sounds like a plan. go ahead.
> I'll also look into meaningful additional checks to be added to sanitize-commit.
>
cool.
More information about the Development
mailing list