reuse-tool
reuse-tool copied to clipboard
Bogus "Bad licenses: Apac"
Using version 1.1.2 in CI over here, we're getting
# BAD LICENSES
'Apac' found in:
* buildSrc/src/main/kotlin/LicenseUtils.kt
# MISSING LICENSES
'Apac' found in:
* buildSrc/src/main/kotlin/LicenseUtils.kt
# SUMMARY
* Bad licenses: Apac
* Deprecated licenses:
* Licenses without file extension:
* Missing licenses: Apac
* Unused licenses:
* Used licenses: Apac, Apache-2.0, CC-BY-3.0, CC-BY-4.0, CC0-1.0, MIT, OFL-1.1
* Read errors: 0
* Files with copyright information: 2360 / 2360
* Files with license information: 2360 / 2360
Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-(
That sounds bogus, as there is no license called "Apac" in LicenseUtils.kt, and "Apac" more looks like a truncated "Apache-2.0".
That's totally weird: If I change the line
val expectedHolder = "The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)"
to
const val expectedHolder = "The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)"
(i.e. just the const is added) the error goes away.
Strange.
Could it be that the license tag is rather far into the document?
reuse only checks the first 4096 bytes as a performance optimisation, but this should probably be adjusted at some point.
Could it be that the license tag is rather far into the document?
No, in lines 16 / 17 we have:
- SPDX-License-Identifier: Apache-2.0
- License-Filename: LICENSE
Can you link a tag/commit SHA of the broken commit?
I'd probably have to get out the debugger to solve this.
Can you link a tag/commit SHA of the broken commit?
See https://github.com/oss-review-toolkit/ort/blob/reuse-issue-793/buildSrc/src/main/kotlin/LicenseUtils.kt#L67 / https://github.com/oss-review-toolkit/ort/commit/774ba64a90724307e21541de0f7bbca5cfa615df (i.e. use branch reuse-issue-793 of ORT and look at file buildSrc/src/main/kotlin/LicenseUtils.kt, line 76).
Thank you. I will find some time to investigate.