aboutcode-org / aboutcode-org/scancode-toolkit

Not skipping node_modules directory

オープン
#3,775 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
5

説明

### Description
While scanning my node.js codebase, I could see it scan the node_modules directory as well, which is not necessary and time consuming.

### How To Reproduce
![image](https://github.com/nexB/scancode-toolkit/assets/57087973/4530efe6-6bc1-4897-80d5-299f9c5c820d)

Snapshot 1: Codebase where node_modules was scanned

![image](https://github.com/nexB/scancode-toolkit/assets/57087973/ae2315b2-9b05-469a-a9f1-6f2dd2c6ca17)

Snapshot 2: Codebase where `npm install` was not done (node_modules directory doesn't exist)

### Thoughts
This seems to be not working:
```
for child in resource.children(codebase):
if depth == 0 and child.name == 'node_modules':
continue
yield child
```

> For bug reports, it really helps us to know:

* What OS are you running on? (Windows/MacOS/Linux) - Windows 11
* What version of scancode-toolkit was used to generate the scan file? - v32.1.0-7-g4f49985c26
* What installation method was used to install/run scancode? (pip/source download/other) - source download

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。