6
61
Fork
You've already forked reuse-tool
23

"lint --json" does the job of "spdx --json" #1338

Open
opened 2026年02月21日 13:33:49 +01:00 by buhtz · 0 comments

Hello,
by accident I discovered that the switch --json used with reuse lint does not only provide the regular output in JSON format but also extend the content much more and provide detailed information about each file contained in the repo.

This is the regular output:

$ reuse lint
# ZUSAMMENFASSUNG
* Falsche Lizenzen: 0
* Veraltete Lizenzen: 0
* Lizenzen ohne Dateiendung: 0
* Fehlende Lizenzen: 0
* Unbenutzte Lizenzen: 0
* Verwendete Lizenzen: CC0-1.0, GPL-2.0-or-later, GPL-3.0-or-later, MIT
* Lesefehler: 0
* Invalid SPDX License Expressions: 0
* Files with copyright information: 367 / 367
* Files with license information: 367 / 367
Herzlichen Glückwunsch! Ihr Projekt ist konform mit Version 3.3 der REUSE-Spezifikation :-)

This is the same project but using JSON format.

$ reuse lint --json
{
 "lint_version": "1.0",
 "reuse_spec_version": "3.3",
 "reuse_tool_version": "6.2.0",
 "files": [
 {
 "path": "doc/manual/src/_images/light/settings_autoremove.png",
 "copyrights": [
 {
 "value": "\u00a9 2024 Kosta Vukicevic (@stcksmsh)",
 "source": "doc/manual/src/REUSE.toml",
 "source_type": "reuse-toml"
 }
 ],
 "spdx_expressions": [
 {
 "value": "GPL-2.0-or-later",
 "is_valid": true,
 "source": "doc/manual/src/REUSE.toml",
 "source_type": "reuse-toml"
 }
 ]
 },
 {
 "path": "common/test/test_backintime.py",
 "copyrights": [
 {
 "value": "SPDX-FileCopyrightText: 2016 Taylor Raack",
 "source": "common/test/test_backintime.py",
 "source_type": "file-header"
 }
 ],
 "spdx_expressions": [
 {
 "value": "GPL-2.0-or-later",
 "is_valid": true,
 "source": "common/test/test_backintime.py",
 "source_type": "file-header"
 }
 ]
 },
 # ... SNIPPED ...
 {
 "path": "qt/manageprofiles/storagesizewidget.py",
 "copyrights": [
 {
 "value": "SPDX-FileCopyrightText: \u00a9 2025 Christian BUHTZ <c.buhtz@posteo.jp>",
 "source": "qt/manageprofiles/storagesizewidget.py",
 "source_type": "file-header"
 }
 ],
 "spdx_expressions": [
 {
 "value": "GPL-2.0-or-later",
 "is_valid": true,
 "source": "qt/manageprofiles/storagesizewidget.py",
 "source_type": "file-header"
 }
 ]
 }
 ],
 "non_compliant": {
 "bad_licenses": [],
 "deprecated_licenses": [],
 "licenses_without_extension": [],
 "missing_licenses": [],
 "unused_licenses": [],
 "read_errors": [],
 "missing_copyright_info": [],
 "missing_licensing_info": []
 },
 "summary": {
 "used_licenses": [
 "CC0-1.0",
 "GPL-2.0-or-later",
 "GPL-3.0-or-later",
 "MIT"
 ],
 "files_total": 367,
 "files_with_copyright_info": 367,
 "files_with_licensing_info": 367,
 "compliant": true
 },
 "recommendations": []

I am glad that this json output does exist. But I would expect it from reuse spdx --json and not from the lint command.

Hello, by accident I discovered that the switch `--json` used with `reuse lint` does not only provide the regular output in JSON format but also extend the content much more and provide detailed information about each file contained in the repo. This is the **regular output**: ```sh $ reuse lint # ZUSAMMENFASSUNG * Falsche Lizenzen: 0 * Veraltete Lizenzen: 0 * Lizenzen ohne Dateiendung: 0 * Fehlende Lizenzen: 0 * Unbenutzte Lizenzen: 0 * Verwendete Lizenzen: CC0-1.0, GPL-2.0-or-later, GPL-3.0-or-later, MIT * Lesefehler: 0 * Invalid SPDX License Expressions: 0 * Files with copyright information: 367 / 367 * Files with license information: 367 / 367 Herzlichen Glückwunsch! Ihr Projekt ist konform mit Version 3.3 der REUSE-Spezifikation :-) ``` This is the same project but using JSON format. ```json $ reuse lint --json { "lint_version": "1.0", "reuse_spec_version": "3.3", "reuse_tool_version": "6.2.0", "files": [ { "path": "doc/manual/src/_images/light/settings_autoremove.png", "copyrights": [ { "value": "\u00a9 2024 Kosta Vukicevic (@stcksmsh)", "source": "doc/manual/src/REUSE.toml", "source_type": "reuse-toml" } ], "spdx_expressions": [ { "value": "GPL-2.0-or-later", "is_valid": true, "source": "doc/manual/src/REUSE.toml", "source_type": "reuse-toml" } ] }, { "path": "common/test/test_backintime.py", "copyrights": [ { "value": "SPDX-FileCopyrightText: 2016 Taylor Raack", "source": "common/test/test_backintime.py", "source_type": "file-header" } ], "spdx_expressions": [ { "value": "GPL-2.0-or-later", "is_valid": true, "source": "common/test/test_backintime.py", "source_type": "file-header" } ] }, # ... SNIPPED ... { "path": "qt/manageprofiles/storagesizewidget.py", "copyrights": [ { "value": "SPDX-FileCopyrightText: \u00a9 2025 Christian BUHTZ <c.buhtz@posteo.jp>", "source": "qt/manageprofiles/storagesizewidget.py", "source_type": "file-header" } ], "spdx_expressions": [ { "value": "GPL-2.0-or-later", "is_valid": true, "source": "qt/manageprofiles/storagesizewidget.py", "source_type": "file-header" } ] } ], "non_compliant": { "bad_licenses": [], "deprecated_licenses": [], "licenses_without_extension": [], "missing_licenses": [], "unused_licenses": [], "read_errors": [], "missing_copyright_info": [], "missing_licensing_info": [] }, "summary": { "used_licenses": [ "CC0-1.0", "GPL-2.0-or-later", "GPL-3.0-or-later", "MIT" ], "files_total": 367, "files_with_copyright_info": 367, "files_with_licensing_info": 367, "compliant": true }, "recommendations": [] ``` I am glad that this json output does exist. But I would expect it from `reuse spdx --json` and not from the `lint` command.
Sign in to join this conversation.
No Branch/Tag specified
main
janderssonse/fix/add-security-policy
mirror-codeberg
changelog-2.0.0-extend
readme-reuse-3.1
feature/debian-inspector
feature/dep5-error-handling
v6.2.0
v6.1.2
v6.1.1
v6.1.0
v6.0.0
v5.1.1
v5.1.0
v5.0.2
v5.0.1
v5.0.0
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.1.0a1
v3.0.2
v3.0.1
v3.0.0
v2.1.0
v2.0.0
v1.1.2
v1.1.1
v1.1.0
v1.0.0
v0.14.0
v0.13.0
v0.12.1
v0.12.0
v0.11.1
v0.11.0
v0.10.1
v0.10.0
v0.9.0
v0.8.1
v0.8.0
v0.7.0
v0.6.0
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.4.0a1
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.0
v0.1.1
v0.1.0
v0.0.4
v0.0.3
v0.0.2
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
fsfe/reuse-tool#1338
Reference in a new issue
fsfe/reuse-tool
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?