Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/cluecode/copyrights.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def from_node(
# COPYRIGHT
############################################################################

# first some exceptions
# some exceptions

# NOT a copyright Copyright.txt : treat as NN
(r'^Copyright\.txt$', 'NN'),
Expand Down Expand Up @@ -581,6 +581,10 @@ def from_node(
# JUNK are things to ignore
############################################################################

# path with trailing year-like are NOT a year as in
# Landroid/icu/impl/IDNA2003 : treat as JUNK
(r'^[^\\/]+[\\/][^\\/]+[\\/].*$', 'JUNK'),

# Combo of many (3+) letters and punctuations groups without spaces is likely junk
# "AEO>>,o>>'!xeoI?o?O1/4thuA/"
# (r'((\w+\W+){3,})+', 'JUNK'),
Expand Down
4 changes: 4 additions & 0 deletions tests/cluecode/data/copyrights/year-like-path.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Landroid/icu/impl/IDNA2003;->startsWithPrefix(Ljava/lang/StringBuffer;)Z,BLACK
Landroid/icu/impl/IDNA2003;->toASCIILower(C)C,BLACK
Landroid/icu/impl/IDNA2003;->toASCIILower(Ljava/lang/CharSequence;)Ljava/lang/StringBuffer;,BLACK

2 changes: 2 additions & 0 deletions tests/cluecode/data/copyrights/year-like-path.txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
what:
- copyrights