lkml.org 
[lkml]   [2019]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] docs: license-rules.txt: cover SPDX headers on Python scripts
From
Date
On Fri, 2019-09-06 at 08:34 -0300, Mauro Carvalho Chehab wrote:
> I did some changes on it, plus one change at the pedantic mode of
> scripts/spdxcheck.py, and placed the corresponding patches at:
>
> https://git.linuxtv.org/mchehab/experimental.git/log/?h=spdx_pedantic

Your script needs a modification of this line:

$spdx = $1 if m/(SPDX-License-Identifier:.*)/;

This is on $_ and not $spdx.

This line needs to be:

$spdx = $1 if $spdx =~ m/(SPDX-License-Identifier:.*)/;

Otherwise the script produces:
---
diff --git a/tools/perf/util/rlimit.h b/tools/perf/util/rlimit.h
index 9f59d8e..5d975b9 100644
--- a/tools/perf/util/rlimit.h
+++ b/tools/perf/util/rlimit.h
@@ -1,6 +1,6 @@
+/* SPDX-License-Identifier: LGPL-2.1 */ */
#ifndef __PERF_RLIMIT_H_
#define __PERF_RLIMIT_H_
-/* SPDX-License-Identifier: LGPL-2.1 */

void rlimit__bump_memlock(void);
#endif // __PERF_RLIMIT_H_

\
 
 \ /
  Last update: 2019-09-06 19:35    [W:0.079 / U:16.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site