From: Oleg Verych <olecom@flower.upol.cz>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
kbuild-devel@lists.sourceforge.net,
LKML <linux-kernel@vger.kernel.org>
Subject: Another version of cleanfile/cleanpatch (Re: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines)
Date: Wed, 6 Jun 2007 19:45:56 +0200 [thread overview]
Message-ID: <20070606174556.GS7266@flower.upol.cz> (raw)
In-Reply-To: <20070605151101.GQ7266@flower.upol.cz>
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
While i'm against whitespace damaged files or patches since my very
first patch, and don't like brain damaged programmer's tools called
text editors, i also want to encourage UNIX-way of using userspace.
Of course, i might be wrong and foolish. Anyway, what i'm trying to do
is not to become new generation of Visual Perl#(R) implemented in
Java(R) using XML with userspace, that suck.
Many things in XXI century still can be done by tools founded 20-30
years ago. Why not try to?
Here is script proposal and test case, just for interested parties.
--
-o--=O`C info emacs : faq
#oo'L O info make : not found
<___=E M man gcc : not found
[-- Attachment #2: clean-whitespace.sh --]
[-- Type: application/x-sh, Size: 842 bytes --]
[-- Attachment #3: clean-whitespace.test --]
[-- Type: text/plain, Size: 1191 bytes --]
# last spaces must NOT be striped to two tabs
tabspace spaces tab spaces tab
# trailing tabs mixed with spaces
2x8 spaces, must be 2xtabs
tab spaces tab, bust be 2 tabs
# more trailing whitespace
bar
## Automatically generated incremental diff
## From: linux-2.6.21-rc4
## To: linux-2.6.21-rc5
## Robot: $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $
--- linux-2.6.21-rc4/Documentation/kernel-parameters.txt 2007-03-25 23:12:16.654792317 +0000
# dont strip trailing whitespace
+++ linux-2.6.21-rc5/Documentation/kernel-parameters.txt 2007-03-25 23:12:21.243287617 +0000
@@ -138,6 +138,12 @@
- int gpio_direction_output(unsigned gpio);
# tab space tab -> tab tab, strip trailing whitespace
+ int gpio_direction_output(unsigned gpio, int value);
The return value is zero for success, else a negative errno. It should
be checked, since the get/set calls don't have error returns and since
misconfiguration is possible. (These calls could sleep.)
# dont touch space
+ tester, add space for wide line ... vided becomes the initial output value.
# end of file, must be one new line
efwef
next prev parent reply other threads:[~2007-06-06 17:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-03 20:47 [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines Sam Ravnborg
2007-06-04 16:07 ` Jan Engelhardt
2007-06-05 7:33 ` [kbuild-devel] " Oleg Verych
2007-06-05 8:19 ` Sam Ravnborg
2007-06-05 12:48 ` Oleg Verych
2007-06-05 13:38 ` Oleg Verych
2007-06-05 14:12 ` Sam Ravnborg
2007-06-05 14:57 ` Oleg Verych
2007-06-05 15:11 ` Oleg Verych
2007-06-06 17:45 ` Oleg Verych [this message]
2007-06-06 17:50 ` Another version of cleanfile/cleanpatch (Re: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines) Sam Ravnborg
2007-06-06 19:14 ` Another version of cleanfile/cleanpatch Oleg Verych
2007-06-07 14:36 ` Jan Engelhardt
2007-06-07 23:06 ` Oleg Verych
2007-06-07 23:19 ` [kbuild-devel] " H. Peter Anvin
2007-06-08 1:35 ` Oleg Verych
2007-06-08 6:40 ` [patch] scripts: clean-whitespace.sh Oleg Verych
2007-06-08 6:44 ` Andrew Morton
2007-06-08 14:28 ` Sam Ravnborg
2007-06-08 15:02 ` Oleg Verych
2007-06-08 19:05 ` Sam Ravnborg
2007-06-08 21:07 ` Oleg Verych
2007-06-08 5:27 ` Another version of cleanfile/cleanpatch Jan Engelhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070606174556.GS7266@flower.upol.cz \
--to=olecom@flower.upol.cz \
--cc=akpm@linux-foundation.org \
--cc=kbuild-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®