Skip to contentSkip to conversation

removing trailing blanks in lvm and dm

DISCUSSION Jim Meyering 2 participants 4 messages Sep 21, 2007

lore
Share & tools
lore
#0 lore raw

Hi Alasdair,

I'd like to remove all trailing blanks from lvm and dm.

I want to do this because I've been burned by them upon occasion and so, now I use a mode in emacs and in vi that highlights them, as well as another that asks me whether to remove them whenever I write a file in emacs. FWIW, a trailing space in a Makefile is significant, in some contexts (years ago, that one was a pain to track down), and in code, e.g., after a backslash. There's only one Makefile.in with a trailing blank, and it's a harmless one, so I can't point to a specific fault here. This is just preventive medicin.

Only about 1/3 of the affected lines (600+ lines in 217 files in LVM2) are in code. The majority are in man pages and on Copyright lines.

I'll even add a "make distcheck" rule that fails when a new one is introduced.

Ok?

#1 lore raw
Quoted 1 line · Jim Meyering

I'd like to remove all trailing blanks from lvm and dm.

Please wait till the next release - then let's make the following release a clean-up one that makes no functional changes.

Alasdair

Signature · 1 line
agk at redhat.com
#2 lore raw
In reply to Jim Meyering
Quoted 2 lines · Jim Meyering

I'll even add a "make distcheck" rule that fails when a new one is introduced.

An automatic pre-commit check, perhaps?

Alasdair

Signature · 1 line
agk at redhat.com
#3 lore raw
In reply to Jim Meyering
Quoted 2 lines · Jim Meyering

I'll even add a "make distcheck" rule that fails when a new one is introduced.

And (optionally) fixes them all. (E.g. produces a patch you can review and apply.)

Alasdair

Signature · 1 line
agk at redhat.com