[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201002151849.840bd4c1187d870f328da056@linux-foundation.org>
Date: Fri, 2 Oct 2020 15:18:49 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Joe Perches <joe@...ches.com>
Cc: Andy Whitcroft <apw@...onical.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch: Emit a warning on embedded filenames
On Thu, 01 Oct 2020 11:28:10 -0700 Joe Perches <joe@...ches.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!
Powered by blists - more mailing lists