Skip to content
Open
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
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ The following organizations or individuals have contributed to ScanCode:
- Vibhu Agarwal @Vibhu-Agarwal
- Viktor Tiulpin @tiulpin
- Vinay Kumar Singh @Vinay0001
- Vincent Gao @gaoflow
- Virag Umathe @viragumathe5
- Yash D. Saraf @yashdsaraf
- Yash Nisar @yash-nisar
Expand Down
3 changes: 3 additions & 0 deletions src/cluecode/copyrights.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,9 @@ def build_detection_from_node(

(r"^[a-z].+\(s\)[\.,]?$", 'JUNK'),

# KISA with an opening parenthesized expansion, as in "KISA(Korea"
(r"^KISA\(Korea$", 'NNP'),

# parens in the middle: for(var
(r"^[a-zA-Z]+[\)\(]+,?[\)\(]?[a-zA-Z]+[\.,]?$", 'JUNK'),

Expand Down
1 change: 1 addition & 0 deletions tests/cluecode/data/copyrights/kisa_seed_local.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) 2007 KISA(Korea Information Security Agency).
7 changes: 7 additions & 0 deletions tests/cluecode/data/copyrights/kisa_seed_local.h.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
what:
- copyrights
- holders
copyrights:
- Copyright (c) 2007 KISA(Korea Information Security Agency)
holders:
- KISA(Korea Information Security Agency)
4 changes: 2 additions & 2 deletions tests/licensedcode/test_detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,8 @@ def test_match_has_correct_line_positions_in_automake_perl_file(self):
expected = [
# detected, match.lines(), match.qspan,
('gpl-2.0-plus', (12, 25), Span(51, 160)),
('fsf-unlimited-no-warranty', (231, 238), Span(986, 1049)),
('warranty-disclaimer', (306, 307), Span(1359, 1381)),
('fsf-unlimited-no-warranty', (231, 238), Span(998, 1061)),
('warranty-disclaimer', (306, 307), Span(1371, 1393)),
]
self.check_position('positions/automake.pl', expected)

Expand Down
8 changes: 3 additions & 5 deletions tests/scancode/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ def test_scan_info_returns_full_root():
result_data = json.loads(open(result_file).read())
file_paths = [f['path'] for f in result_data['files']]
assert len(file_paths) == 12
# note that we strip paths from leading and trailing slashes
root = fileutils.as_posixpath(test_dir).strip('/')
root = fileutils.as_posixpath(test_dir)
assert all(p.startswith(root) for p in file_paths)


Expand All @@ -182,9 +181,8 @@ def test_scan_info_returns_correct_full_root_with_single_file():
# we have a single file
assert len(files) == 1
scanned_file = files[0]
# and we check that the path is the full path without repeating the file name
# note that the path never contain leading and trailing slashes
assert scanned_file['path'] == fileutils.as_posixpath(test_file).strip('/')
# and we check that the path is the full absolute path without repeating the file name
assert scanned_file['path'] == fileutils.as_posixpath(test_file)


def test_scan_info_returns_does_not_strip_root_with_single_file():
Expand Down