Re: [PATCH] docs: license-rules.txt: cover SPDX headers on Python scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux