Skip to content

Commit 66c8c10

Browse files
committed
\#405 Add new rule to capture \Copyright 2007-2010 the original author or authors.\
1 parent 9aba333 commit 66c8c10

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/cluecode/copyrights.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,10 @@ def detect(location):
430430
# Copyright (c) 1999, 2000 - D.T.Shield.
431431
COPYRIGHT2: {<COPY> <COPY>? <YR-RANGE> <DASH> <NN>}
432432
433+
# Copyright 2007-2010 the original author or authors.
434+
# Copyright (c) 2007-2010 the original author or authors.
435+
COPYRIGHT2: {<COPY> <COPY>? <YR-RANGE> <NN> <JUNK> <AUTH> <NN> <AUTH>}
436+
433437
COPYRIGHT2: {<COPY> <COPY> <YR-RANGE> <BY> <NN> <NN> <NAME>}
434438
COPYRIGHT2: {<COPY> <YR-RANGE> <BY> <NN> <NN> <NAME>}
435439

tests/cluecode/test_copyrights.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3991,3 +3991,13 @@ def test_copyright_with_year_comp_and_auth(self):
39913991
test_lines = [u'Copyright 2012-2016, Project contributors']
39923992
expected = [u'Copyright 2012-2016, Project contributors']
39933993
check_detection(expected, test_lines)
3994+
3995+
def test_copyright_with_year_noun_junk_auth_noun_and_auth(self):
3996+
test_lines = [u'Copyright 2007-2010 the original author or authors.']
3997+
expected = [u'Copyright 2007-2010 the original author or authors.']
3998+
check_detection(expected, test_lines)
3999+
4000+
def test_copyright_with_sign_year_noun_junk_auth_noun_and_auth(self):
4001+
test_lines = [u'Copyright (c) 2007-2010 the original author or authors.']
4002+
expected = [u'Copyright (c) 2007-2010 the original author or authors.']
4003+
check_detection(expected, test_lines)

0 commit comments

Comments
 (0)