From 4b4135413a30f62066a616b82a4b34a0bbf6ce62 Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Tue, 4 Oct 2022 18:51:25 +0200 Subject: [PATCH 1/2] Improve author detection This is form of author with just a first name and email. Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 3 +++ tests/cluecode/data/copyrights/author-name-email.txt | 4 ++++ tests/cluecode/data/copyrights/author-name-email.txt.yml | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 tests/cluecode/data/copyrights/author-name-email.txt create mode 100644 tests/cluecode/data/copyrights/author-name-email.txt.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 4dcec586a69..ce8c6ebe87c 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -2620,6 +2620,9 @@ def build_detection_from_node( # author (Panagiotis Tsirigotis) AUTHOR: { +} #author Foo Bar + # Author: Tim (xtimor@gmail.com) + AUTHOR: { + +} #Author Foo joe@email.com + ####################################### # Mixed AUTHOR and COPYRIGHT diff --git a/tests/cluecode/data/copyrights/author-name-email.txt b/tests/cluecode/data/copyrights/author-name-email.txt new file mode 100644 index 00000000000..c5ba7fba1fd --- /dev/null +++ b/tests/cluecode/data/copyrights/author-name-email.txt @@ -0,0 +1,4 @@ + * NMEA library + * URL: http://nmea.sourceforge.net + * Author: Tim (xtimor@gmail.com) + diff --git a/tests/cluecode/data/copyrights/author-name-email.txt.yml b/tests/cluecode/data/copyrights/author-name-email.txt.yml new file mode 100644 index 00000000000..55fa78075db --- /dev/null +++ b/tests/cluecode/data/copyrights/author-name-email.txt.yml @@ -0,0 +1,4 @@ +what: + - authors +authors: + - Tim (xtimor@gmail.com) From ac06b60fa242be6ade1875e86a95920ffb302885 Mon Sep 17 00:00:00 2001 From: Ayan Sinha Mahapatra Date: Wed, 5 Oct 2022 00:43:05 +0530 Subject: [PATCH 2/2] Fix test failures with ignorable authors Signed-off-by: Ayan Sinha Mahapatra --- src/licensedcode/data/licenses/nortel-dasa.yml | 3 +++ src/licensedcode/data/rules/nortel-dasa_1.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/licensedcode/data/licenses/nortel-dasa.yml b/src/licensedcode/data/licenses/nortel-dasa.yml index adc50e81366..4dc4d28346d 100644 --- a/src/licensedcode/data/licenses/nortel-dasa.yml +++ b/src/licensedcode/data/licenses/nortel-dasa.yml @@ -6,3 +6,6 @@ owner: Unspecified spdx_license_key: LicenseRef-scancode-nortel-dasa ignorable_emails: - frank@comsys.dofn.de +ignorable_authors: + - F.Schnekenbuehl + diff --git a/src/licensedcode/data/rules/nortel-dasa_1.yml b/src/licensedcode/data/rules/nortel-dasa_1.yml index d1568572710..eb691072681 100644 --- a/src/licensedcode/data/rules/nortel-dasa_1.yml +++ b/src/licensedcode/data/rules/nortel-dasa_1.yml @@ -3,3 +3,6 @@ is_license_text: yes relevance: 100 ignorable_emails: - frank@comsys.dofn.de +ignorable_authors: + - F.Schnekenbuehl +