aboutcode-org / aboutcode-org/scancode-toolkit

Incorrect start and end line reported for .sfd file

オープン
#3,294 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
2.6k
フォーク
791
平均マージ
1日 12時間
マージ済み PR(30日)
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 はまだ評価されていません。

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

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