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

Bug#647551: lintian: lintian-info outputs extra EOL whitespaces in tag descriptions



On Thu, 2011-11-03 at 22:27 +0200, jari wrote:
> On 2011-11-03 20:15, Adam D. Barratt wrote:
> | On Thu, 2011-11-03 at 21:32 +0200, Jari Aalto wrote:
> | > There seems to be extra EOL whitespaces in output after each paragraph
> | > break.
[...]
> | Indeed there does.  I have to ask though, why is this a problem in any
> | way?  What is processing lintian output in a way that's so sensitive to
> | the possible presence of such whitespace?
> | 
> | In fact, I'd argue that removing it would actually be wrong.  The entire
> | description is indented by three spaces and the paragraph breaks are
> | part of that description.
> 
> In general, I believe the outputs should be clean and have no extra EOL
> whitespaces.
> 
> E.g. Git version control by default refuses to inject code that
> contains EOL whitespace.

And people are actually feeding lintian-info output in to git verbatim?

> For that reason I have configured Emacs to use whitespace-mode
> globally; as it happens it also shows problematic outputs in M-x shell
> buffer as well with red colors (quite distracting actually).

That you have configured your editor in a way that makes lintian's
output annoying to you does not make that output incorrect, at least in
the opinion of this maintainer.  I haven't closed the bug yet, but I'm
very tempted to.

> I't a simple operation in Perl to fix:
> 
>     perl -e '$_ = "this  \n  line\n   \n  \n"; s/[ \t]+$//gsm; print'

Thank you for assuming that we couldn't have worked that trivial
operation out for ourselves. :-/  However, if you actually examine the
code, you'll find it's really not that simple.  You want to start at
Lintian::Tag::Info::description() and its call from lintian-info.

If you were to provide a patch that resolved the issue you perceive,
without affecting any other part of lintian, then I might be inclined to
apply it.  As it is, I don't believe this is an issue, nor that it's
"fixable" without effort that could be far better spent in other areas,
such as fixing some of the real bugs open against lintian.

Regards,

Adam




Reply to: