Skip to content

Commit b86dc0d

Browse files
authored
Merge pull request #2838 from nexB/1816-spdx-filecontributor
Detect SPDX-FileContributor tags as authors
2 parents 1cb4615 + dc78638 commit b86dc0d

4 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/cluecode/copyrights.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,9 @@ def build_detection_from_node(
639639
# SPDX-FileCopyrightText as defined by the FSFE Reuse project
640640
(r'^[Ss][Pp][Dd][Xx]-[Ff]ile[Cc]opyright[Tt]ext', 'COPY'),
641641

642+
# SPDX-FileContributor as defined in SPDX and seen used in KDE
643+
(r'^[Ss][Pp][Dd][Xx]-[Ff]ile[Cc]ontributor', 'SPDX-CONTRIB'),
644+
642645
############################################################################
643646
# ALL Rights Reserved.
644647
############################################################################
@@ -2566,6 +2569,9 @@ def build_detection_from_node(
25662569
# Authors
25672570
#######################################
25682571
2572+
# SPDX-FileContributor special case
2573+
AUTHOR: {<SPDX-CONTRIB> <CCOMPANY|NAME|NAME-EMAIL|NAME-YEAR|EMAIL> <COMPANY|NAME|NAME-EMAIL|NAME-YEAR|EMAIL|NN>? } #264000
2574+
25692575
# developed by Project Mayo.
25702576
AUTHOR: {<AUTH2>+ <BY> <COMPANY> <NNP>} #2645-1
25712577
@@ -2923,6 +2929,7 @@ def refine_names(s, prefixes):
29232929
'authors,',
29242930
'authorship',
29252931
'or',
2932+
'spdx-filecontributor',
29262933
])
29272934
))
29282935

src/cluecode/copyrights_hint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
'right',
6262
'reserv',
6363
'auth',
64+
'filecontributor',
6465
'devel',
6566
'<s>',
6667
'</s>',
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* SPDX-FileCopyrightText: 2008 Red Hat Inc.
2+
* SPDX-FileContributor: Adam Jackson <ajax@redhat.com>
3+
* SPDX-FileContributor: Bill Nottingham <notting@redhat.com>
4+
* SPDX-FileContributor: Ray Strode <rstrode@redhat.com>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
what:
2+
- copyrights
3+
- holders
4+
- authors
5+
6+
copyrights:
7+
- Copyright 2008 Red Hat Inc.
8+
holders:
9+
- Red Hat Inc.
10+
authors:
11+
- Adam Jackson <ajax@redhat.com>
12+
- Bill Nottingham <notting@redhat.com>
13+
- Ray Strode <rstrode@redhat.com>
14+

0 commit comments

Comments
 (0)