From: Jonathan Corbet <corbet@lwn.net>
To: "Aurélien Cedeyn" <aurelien.cedeyn@gmail.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
akpm@linux-foundation.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH] scripts/spdxcheck.py: fix C++ comment style detection
Date: Fri, 22 Feb 2019 08:48:25 -0700 [thread overview]
Message-ID: <20190222084825.4c2405e1@lwn.net> (raw)
In-Reply-To: <9b8ba571688ec58361a502dc93693b2bfb1752dc.1550692590.git.aurelien.cedeyn@gmail.com>
On Wed, 20 Feb 2019 22:18:34 +0100
Aurélien Cedeyn <aurelien.cedeyn@gmail.com> wrote:
> With the last commit to support the SuperH boot code files, we have the
> following regression:
>
> $ ./scripts/checkpatch.pl -f <(echo '/* SPDX-License-Identifier: MIT */')
> WARNING: 'SPDX-License-Identifier: MIT */' is not supported in LICENSES/..
> +/* SPDX-License-Identifier: MIT */
>
> total: 0 errors, 1 warnings, 1 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
>
> /dev/fd/63 has style problems, please review.
>
> NOTE: If any of the errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
> This is not obvious, but spdxcheck.py is launched in checkpatch.pl with :
> ...
> } elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
> my $spdx_license = $1;
> if (!is_SPDX_License_valid($spdx_license)) {
> WARN("SPDX_LICENSE_TAG",
> "'$spdx_license' is not supported in LICENSES/...\n" . \
> $herecurr);
> }
> ...
> sub is_SPDX_License_valid {
> my ($license) = @_;
> ...
> my $status = `cd "$root_path"; echo "$license" |
> python scripts/spdxcheck.py -`;
> ...
> }
>
> The first chars before 'SPDX-License-Identifier:' are ignored.
> This commit fixes this regression.
>
> Fixes:959b49687838 (scripts/spdxcheck.py: Handle special quotation mark comments)
> Signed-off-by:Aurélien Cedeyn <aurelien.cedeyn@gmail.com>
I've applied this, thanks, though that parsing code still looks a little
fragile. It needs a proper regex perhaps someday...:)
Thanks,
jon
prev parent reply other threads:[~2019-02-22 15:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 21:18 Aurélien Cedeyn
2019-02-22 15:48 ` Jonathan Corbet [this message]
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=20190222084825.4c2405e1@lwn.net \
--to=corbet@lwn.net \
--cc=akpm@linux-foundation.org \
--cc=aurelien.cedeyn@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®