Bug#409124: [aesthetics] report trailing blank lines and whitespace
Russ Allbery <rra@debian.org> writes:
> I'll add a pendantic check along these lines for the next version of
> lintian.
After reviewing Policy, I've changed my mind about this. Policy is very
explicit about this:
Each paragraph consists of a series of data fields; each field
consists of the field name, followed by a colon and then the
data/value associated with that field. It ends at the end of the
(logical) line. Horizontal whitespace (spaces and tabs) may occur
immediately before or after the value and is ignored there; it is
conventional to put a single space after the colon. For example, a
field might be:
Package: libc6
the field name is Package and the field value libc6.
Many fields' values may span several lines; in this case each
continuation line must start with a space or a tab. Any trailing
spaces or tabs at the end of individual lines of a field value are
ignored.
Anything that doesn't handle whitespace in that way is buggy and needs to
be fixed. I don't think warning (even as a pedantic warning) about
packages that follow Policy's requirements for debian/control is a good
idea. I have added a pedantic tag for fields that don't use a single
space after the colon; that's the one thing that's present in Policy as a
pseudo-recommendation.
I'm working on patches now to Lintian's functions for reading control
files to follow Policy exactly and strip out that whitespace before the
rest of Lintian sees it, which should prevent any future surprises like we
had with Architecture. Since this is a feature of the input format, the
code that reads the input format should really handle the whitespace
cleanup.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: