From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] checkpatch: Emit a warning on embedded filenames
Date: Fri, 2 Oct 2020 15:18:49 -0700 [thread overview]
Message-ID: <20201002151849.840bd4c1187d870f328da056@linux-foundation.org> (raw)
In-Reply-To: <1fd5f9188a14acdca703ca00301ee323de672a8d.camel@perches.com>
On Thu, 01 Oct 2020 11:28:10 -0700 Joe Perches <joe@perches.com> wrote:
> Embedding the complete filename path inside the file
> isn't particularly useful as often the path is moved
> around and becomes incorrect.
>
> Emit a warning when the source contains the filename.
>
> ...
>
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3273,6 +3273,12 @@ sub process {
> }
> }
>
> +# check for embedded filenames
> + if ($rawline =~ /^\+.*\Q$realfile\E/) { di
> + WARN("EMBEDDED_FILENAME",
> + "It's generally not useful to have the filename in the file\n" . $herecurr);
> + }
> +
I removed that " di". Please check that I merged the correct version
of this!
next prev parent reply other threads:[~2020-10-02 22:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 18:28 Joe Perches
2020-10-01 18:47 ` external tool to remove " Joe Perches
2020-10-02 14:49 ` Bhaskar Chowdhury
2020-10-02 15:13 ` Joe Perches
2020-10-02 22:18 ` Andrew Morton [this message]
2020-10-02 23:35 ` [PATCH] checkpatch: Emit a warning on " Joe Perches
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=20201002151849.840bd4c1187d870f328da056@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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®