LWN.net Logo

The coding style enforcer

The coding style enforcer

Posted May 12, 2005 10:36 UTC (Thu) by NRArnot (subscriber, #3033)
Parent article: The coding style enforcer

If the patch is restricted to inserting whitespace, it could be validated by stripping all whitespace out of the affected code before and after applying the patch, and making sure that the result is identical.


(Log in to post comments)

The coding style enforcer

Posted May 13, 2005 23:25 UTC (Fri) by roelofs (guest, #2599) [Link]

If the patch is restricted to inserting whitespace, it could be validated by stripping all whitespace out of the affected code before and after applying the patch, and making sure that the result is identical.

Or just using indent to canonicalize both "before" and "after" versions, then running diff on the two trees.

Heck, a few tweaks should allow one to use indent directly as the style-enforcement tool...

Greg

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds