aboutcode-org / aboutcode-org/scancode-toolkit

Fail to scan directory

未關閉
#2,175 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
2.6k
分支
791
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

### Description

This issue is related to https://github.com/nexB/scancode-toolkit/issues/1748.

A directory named "rcs" was ignored by Scancode 3.0.2 (and 3.1.1), but not its contents. Scancode threw a KeyError exception and the results did not cover the complete target directory tree. The reason is that Scancode takes "rcs" to be identical to "RCS", which is on its built-in ignore list.

The latest versions of Scancode remove "RCS" from the ignore list, but this seems a partial solution, it would be better to go further and make the checks of directory/file names against items on the ignore list case sensitive (except on Windows). Specifically, get_matches() in fileste.py changes the case of the item to be ignored to lower and I suggest it shouldn't.

### How To Reproduce

Run a scan on a directory containing a subdirectory named "rcs" (with further subdirectories and files in it)

Command-line options used:
--copyright
--license
--ignore
--info
--strip-root
--timeout 300
--processes 15
{DIRECTORY_TO_SCAN}

### System configuration

* OS: Ubuntu 18.04
* scancode-toolkit: 3.0.2 (also tested 3.1.1)

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。