running ident on modular xorg tree
Thomas Winischhofer
thomas at winischhofer.net
Wed Sep 8 16:23:15 PDT 2004
Jeremy C. Reed wrote:
> On Tue, 7 Sep 2004, Jon Smirl wrote:
>
>
>>Would it make sense to run indent over the new xorg modular source
>>tree before a lot of people start using it? Then make it a policy that
>>all check-ins are run through indent too? Given that the tree has been
>>so heavily edited there's no real log trail that will be lost. Would
>>it be good to use the same indent rules that the kernel uses? I'm not
>
>
> What kernel? :)
>
> Like
> http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/indent.pro
> http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style
> http://www.openbsd.org/cgi-bin/man.cgi?query=style&apropos=0&sektion=0&manpath=OpenBSD%20Current&arch=i386&format=html
> http://www.FreeBSD.org/cgi/man.cgi?query=style&sektion=9&apropos=0&manpath=FreeBSD+5.2.1-RELEASE
>
>
>>working in the xorg tree currently, but we're talking about doing this
>>to the drm tree.
>
>
> Since the code is getting farther from other implementations, it does make
> sense and seems like it would be a good idea to have a consistent style.
Coding style is one thing. Indents are another. Hard indents (eg 8 chars
or more) in combination with a limited line length make if- or other
conditional statements (especially in drivers with complicated
multi-level logic, eg different chipsets, different hw features,
different chip revisions, different BIOS versions, etc and mixed OR and
AND at different logical levels) incredibly hard to read and hence
error-prone.
As long as it doesn't get too mixed up (which I don't think is the
case), I'd say we have more important things to do than inventing indent
policies.
Thomas
--
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net http://www.winischhofer.net/
twini AT xfree86 DOT org
More information about the xorg
mailing list