Lintian ReportsBETA

Tag versions

Ptrailing-whitespace

The tag is present in Lintian version 2.113.26. That is the most recent version we know about.

We use semantic versions. The patch number is a commit step indicator relative to the 2.113.0 release tag in our Git repository.

You can find the detection logic for this version at commit 43a81d7. For merge requests, please use the latest version in the Lintian check debian/trailing-whitespace.

Visibility: pedantic

Renamed from:

This file contains lines with trailing whitespace characters.

Whilst often harmless and unsightly, such extra whitespaces can also cause tools to interpret the whitespace characters literally. The tool diff(1) does not like them, either. They are best avoided.

Some of these problems can be hard to track down.

Whitespace at the end of lines may be removed with the following:

$ sed -i -e 's@[[:space:]]*$@@g' debian/control debian/changelog

If you use Emacs, you can also use "M-x wh-cl" (whitespace-cleanup).

However, if you wish to only remove trailing spaces and leave trailing tabs (eg. for Makefiles), you can use the following code snippet:

$ sed -i -e 's@[ ]*$@@g' debian/rules

To remove empty lines from the end of a file, you can use:

$ sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' debian/rules

The following 6364 source packages in the archive triggered the tag 34513 times (in any Lintian version).

We found 8 overrides. The tag performed 100% of the time.