aboutcode-org / aboutcode-org/scancode-toolkit
Incorrect start and end line reported for .sfd file
- 主要语言
- Python
- 星标
- 2.6k
- 派生
- 791
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 5
描述
### Description
I noticed that the line numbers were incorrectly reported when performing a scan. I did some digging and it seemed to come down to the file type being `Spline Font Database version 3.0`. I'm not sure if this is the case for all files of this type however.
I also found that these files are [treated specially](https://github.com/nexB/scancode-toolkit/issues/1083) which might related.
### How To Reproduce
A file that you can use to reproduce this bug is:
https://go.googlesource.com/image/+/refs/tags/v0.6.0/font/testdata/CFFTest.sfd
```sh
$ ./scancode --json-pp - --license ./CFFTest.sfd
```
```json
"matches": [
{
"score": 60.5,
"start_line": 4,
"end_line": 4,
"matched_length": 11,
"match_coverage": 61.11,
"matcher": "3-seq",
"license_expression": "bsd-new",
"rule_identifier": "bsd-new_792.RULE",
"rule_relevance": 99,
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_792.RULE"
}
],
```
```sh
$ head ./CFFTest.sfd | cat -n
1 SplineFontDB: 3.0
2 FontName: CFFTest
3 FullName: CFFTest
4 FamilyName: CFFTest
5 Weight: Regular
6 Copyright: Copyright 2016 The Go Authors. All rights reserved.\nUse of this font is governed by a BSD-style license that can be found at https://golang.org/LICENSE.
7 Version: 001.000
8 ItalicAngle: -11.25
9 UnderlinePosition: -100
10 UnderlineWidth: 50
```
### System configuration
* What OS are you running on? Linux
* What version of scancode-toolkit was used to generate the scan file? Current tip of develop 95a5f3303543293aba33bf5b0d88263e042775d4
* What installation method was used to install/run scancode? Source
贡献指南
评估
这个 Issue 还没有评估数据。