aboutcode-org / aboutcode-org/scancode-toolkit

scancode can not find "license agreement" if there is not a comment with "code" in the file

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

描述

### Description

> I have a cuple of C-Header files from a third party library. We have a license agreement and I want to use ORT for documentation. Scancode detects some of the header files, as expected with a unknown license. Other files are not detected. In most of the files is exactly the same notice, similar to:
```
// ---------------------------------------------------------------------------
// Some produkt - (C) some company
// ---------------------------------------------------------------------------
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with MYSTERY BRAND and may not be copied or
// disclosed except in accordance with the terms of that agreement.
// ---------------------------------------------------------------------------
```
The files that were license_detection'ed match "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/license-intro_22.RULE"
The files not detected produce a license_clue for "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/proprietary-license_782.RULE"
I see some words matching the second one. It looks to me, as if 782 is overriding 22 and than it is thrown away because not enought words are matching. Just a guess... It tried to enable logging but I can't find my way to the failing line.
Funny think: If I put a comment line containing "code" somewhere in line 21 of one of the files it will be detected by rule 22 but i can not reproduce this with the example files.

### How To Reproduce

> I will attach a small example, with some files containing the notice and some dummy code.

scancode -clip --json-pp - ~/dummy/

### System configuration

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

* What OS are you running on? (Windows/MacOS/Linux)
ubuntu-jammy in a WSL on windows 11
* What version of scancode-toolkit was used to generate the scan file?
ScanCode version: 32.3.1
ScanCode Output Format version: 4.0.0
SPDX License list version: 3.25
* What installation method was used to install/run scancode? (pip/source download/other)
some custom steps as part of the toolchain we use. It works fine on many packages.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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