All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "John 'Warthog9' Hawley (VMware)" <warthog9@eaglescrag.net>,
	linux-kernel@vger.kernel.org
Cc: Andy Whitcroft <apw@canonical.com>,
	"Darren Hart (VMware)" <dvhart@infradead.org>
Subject: Re: [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent spurious warnings
Date: Tue, 21 Mar 2017 11:31:08 -0700	[thread overview]
Message-ID: <1490121068.2041.13.camel@perches.com> (raw)
In-Reply-To: <1490113805-9295-1-git-send-email-warthog9@eaglescrag.net>

On Tue, 2017-03-21 at 09:30 -0700, John 'Warthog9' Hawley (VMware) wrote:
> Spamassassin sticks a long (~79 character) long string after a
> line that has a single space in it. The line with space causes
> checkpatch to erroniously think that it's in the content body, as
> opposed to headers and thus flag a mail header as an unwrapped long
> comment line.

If the spammassassin header is like

email-header-n: foo
email-header-m: bar
 
X-Spam-Report: bar

Does that form follow rfc 5322?

If it does then any email header could have that
form and the header wrapping test should be
updated from

		if ($in_header_lines && $realfile =~ /^$/ &&
		    !($rawline =~ /^\s+\S/ ||
		      $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {
			$in_header_lines = 0;
			$in_commit_log = 1;
			$has_commit_log = 1;
		}

to something like

		if ($in_header_lines && $realfile =~ /^$/ &&
		    !($rawline =~ /^ (?:\s*\S|$)/ ||
		      $rawline =~ /^(commit\b|from\b|[\w-]+:).*$/i)) {

  reply	other threads:[~2017-03-21 18:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 16:30 [PATCH] checkpatch: Flag spam header (X-Spam-Report) to prevent spurious warnings John 'Warthog9' Hawley (VMware)
2017-03-21 18:31 ` Joe Perches [this message]
2017-03-22 15:25   ` Darren Hart
2017-03-22 18:17     ` Joe Perches
2017-03-23  6:01       ` Darren Hart
2017-03-23  6:07         ` Joe Perches
2017-03-24 20:14   ` John 'Warthog9' Hawley
2017-03-24 20:19     ` John 'Warthog9' Hawley

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=1490121068.2041.13.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=warthog9@eaglescrag.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.