mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Verych <olecom@flower.upol.cz>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	kbuild-devel@lists.sourceforge.net
Subject: Re: [kbuild-devel] [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines
Date: Tue, 5 Jun 2007 09:33:35 +0200	[thread overview]
Message-ID: <20070605073335.GM7266@flower.upol.cz> (raw)
In-Reply-To: <20070603204700.GH9240@uranus.ravnborg.org>

Hallo.

On Sun, Jun 03, 2007 at 10:47:00PM +0200, Sam Ravnborg wrote:
> Subject: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines
> From: H. Peter Anvin <hpa@zytor.com>
> Date: Fri, 25 May 2007 17:58:26 -0700
> 
> Make the "cleanfile" and "cleanpatch" script warn about long lines,
> by default lines whose visual width exceeds 79 characters.
> 
> Per suggestion from Auke Kok.
> 
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Thank you, Sam, for sending messages back in Kbuild list again.
I have ~30k backlog in LKML, so that thing is good.

So, there are some new scripts. What if my proposition will be better,
so to speak? Any problems i'm willing to fix/enhance.

Note: only one copy of the file required. Sym-linked name *diff* or
*patch* will process patches. I know, that symlinks in sources isn't
good, thus change "$0" -> "$1" will process first parameter.

-*- shell-script: clean-whitespace.sh -*-

#!/bin/sh -e
# stdin/stdout

case $0 in *diff* | *patch*) p='+';; esac
t="`printf '\t'`" ; w79=79 ; IFS=''

while read line
do case "$line" in
   ++*) echo "$line";;
   $p*) line="`echo \"$line\" | expand`"
	[ ${#line} -gt $w79 ] && : ${long:=line}
	echo "$line" | sed -e "/^$p/{s_        _${t}_g;s_^$p *_${p}_;s_ *\$__}"
	;;
     *) echo "$line";;
   esac
done
[ -n "$long" ] && echo "at least one line, wider than $w79 chars, found" 1>&2

-*-
> ---
>  scripts/cleanfile  |   54 ++++++++++++++++++++++++++++++++++++++++++++++-
>  scripts/cleanpatch |   58 +++++++++++++++++++++++++++++++++++++++++++++++++--
>  2 files changed, 107 insertions(+), 5 deletions(-)
>  bla-bla...
____

  parent reply	other threads:[~2007-06-05  7:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03 20:47 Sam Ravnborg
2007-06-04 16:07 ` Jan Engelhardt
2007-06-05  7:33 ` Oleg Verych [this message]
2007-06-05  8:19   ` [kbuild-devel] " 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             ` Another version of cleanfile/cleanpatch (Re: [PATCH 08/19] scripts: Make cleanfile/cleanpatch warn about long lines) Oleg Verych
2007-06-06 17:50               ` 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=20070605073335.GM7266@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®