Skip to content

Commit 8ff5a95

Browse files
committed
fix test failure
this happen due to 'AUTHOR' word because this match with some license file, so i convert the 'AUTHOR:' to 'Author' such that we can't assign 'AUTHOR' to 'AUTH'.
1 parent 8ca1476 commit 8ff5a95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cluecode/copyrights.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,11 @@ def get_tokens(numbered_lines, splitter=re.compile(r'[\t =;]+').split):
432432

433433
# remove leading plus sign
434434
if tok.startswith('+'):
435-
tok = tok.lstrip('+')
435+
tok = tok.lstrip('+')
436+
437+
# convert 'AUTHOR:' to 'author:' or 'Author:'
438+
if tok == 'AUTHOR:':
439+
tok = 'author:'
436440

437441
tok = (
438442
tok
@@ -2032,7 +2036,6 @@ def build_detection_from_node(
20322036
# "authors" or "contributors" is interesting, and so a tag of its own
20332037
(r'^[Aa]uthors,$', 'AUTHDOT'),
20342038
(r'^[Aa]uthor$', 'AUTH'),
2035-
(r'^AUTHOR$', 'AUTH'),
20362039
(r'^[Aa]uthor\.$', 'AUTHDOT'),
20372040
(r'^[Aa]uthors?\.$', 'AUTHDOT'),
20382041
(r'^([Aa]uthors|author\')$', 'AUTHS'),

0 commit comments

Comments
 (0)