[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Indent coding style for lintian



Currently, we have a ton of different coding styles for lintian, and I'm
not planning on proposing going through and reformatting things. But it
would be kind of nice to pick a standard for new files and maybe clean
things up a bit when we have a good opportunity (such as if we're largely
restructuring a particular check anyway).

I use Emacs.  I know a lot of other people who work on lintian use vim.
We should pick something that works for everyone.

I'm one of the people who really dislikes having literal tabs in files as
stored on disk, for the reasons stated in:

    http://www.jwz.org/doc/tabs-vs-spaces.html

Having Tab do the right thing while in the editor, however, is of course
very useful.

Currently, we have some files with eight-space (or literal tab) indents
and some with four-space indents.  The ones with literal tab indents have
file settings that cause vim users to see only four spaces for each tab,
but everyone else sees eight.

I'd like to propose that, for new files, we use:

 * Four-space indents.
 * No literal tabs when saved to disk.
 * Proper settings so that a tab in the editor will do the right indent.

The corresponding vim and Emacs buffer settings, which I volunteer to add
to all of the files, would be:

# Local Variables:
# indent-tabs-mode: nil
# cperl-indent-level: 4
# End:
# vim: syntax=perl sw=4 sts=4 ts=4 et shiftround

Does anyone have any objections to this?

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: