Skip to content

Commit 0cc47a4

Browse files
authored
Merge pull request #2433 from nexB/2432-reuse-copyrights
Detect copyrights in reuse-compliant code #2432
2 parents b4fa96b + d9a5e6a commit 0cc47a4

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/cluecode/copyrights.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ def as_str(cls, node, ignores=frozenset(), include_allrights=False):
411411
(r'^AssemblyCopyright.?$', 'COPY'),
412412
(r'^AppCopyright?$', 'COPY'),
413413

414+
# SPDX-FileCopyrightText as defined by the FSFE Reuse project
415+
(r'^[Ss][Pp][Dd][Xx]-[Ff]ile[Cc]opyright[Tt]ext', 'COPY'),
416+
414417
############################################################################
415418
# ALL Rights Reserved.
416419
############################################################################
@@ -2722,6 +2725,7 @@ def refine_names(s, prefixes):
27222725

27232726

27242727
def remove_dupe_copyright_words(c):
2728+
c = c.replace('SPDX-FileCopyrightText', 'Copyright')
27252729
# from .net assemblies
27262730
c = c.replace('AssemblyCopyright', 'Copyright')
27272731
c = c.replace('AppCopyright', 'Copyright')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2019 Jane Doe <[email protected]>
3+
*
4+
* SPDX-License-Identifier: GPL-3.0-or-later
5+
*/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
what:
2+
- copyrights
3+
- holders
4+
copyrights:
5+
- Copyright 2019 Jane Doe <[email protected]>
6+
holders:
7+
- Jane Doe

0 commit comments

Comments
 (0)