lkml.org 
[lkml]   [2020]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: Emit a warning on embedded filenames
From
Date
On Fri, 2020-10-02 at 15:18 -0700, Andrew Morton wrote:
> 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!

Thanks, it must have been added accidentally in my email client.

Combined, the patches are correct.

\
 
 \ /
  Last update: 2020-10-03 01:36    [W:0.051 / U:0.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site