aboutcode-org / aboutcode-org/scancode-toolkit

Incorrect start and end line reported for .sfd file

Offen
#3,294 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.