Skip to content

Commit 8d2cb1b

Browse files
committed
Revert 682eb74ae0 for single A. in copyrights
Single uppercase letters followed by a period cannot be junk after all as they are often seen in names as abbrevations such as in: John E. Edwards Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 761907b commit 8d2cb1b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/cluecode/copyrights.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,6 @@ def from_node(
600600
# parens such as (1) or (a) is a sign of junk but of course NOT (c)
601601
(r'^\(([abdefghi\d]|ii|iii)\)$', 'JUNK'),
602602

603-
# Single uppercase letters followed by a period
604-
(r'^[A-Z]\.$', 'JUNK'),
605-
606603
# found in crypto certificates and LDAP
607604
(r'^O=$', 'JUNK'),
608605
(r'^OU=?$', 'JUNK'),
@@ -620,7 +617,7 @@ def from_node(
620617
(r'^Agreement$', 'JUNK'),
621618
(r'^Usage$', 'JUNK'),
622619
(r'^Please$', 'JUNK'),
623-
(r'^Based$', 'JUNK'),
620+
(r'^\(?Based$', 'JUNK'),
624621
(r'^Upstream$', 'JUNK'),
625622
(r'^Files?$', 'JUNK'),
626623
(r'^Filename:?$', 'JUNK'),
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
what:
22
- copyrights
33
copyrights:
4-
- Copyright (c) 2007-2018 Free Software Foundation, Inc.
5-
- Copyright 2011 Free Software Foundation, Inc.
4+
- Copyright (c) 2015, Contributors
65

76

tests/cluecode/data/copyrights/copyright-discussion-false-positive.txt.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ copyrights:
55
- Copyright (c) 1990-2005, 2007-2009 Free Software Foundation, Inc.
66
- Copyright (c) 90,2005,2007-2009 Free Software Foundation, Inc.
77
- Copyright (c) 1990-2005, 2007-2009 Free Software Foundation, Inc.
8+
- A. (c) B. (c)
9+
- C. copyright D. (c)
10+

0 commit comments

Comments
 (0)