Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --verbose flag to lint, showing copyright/license info sources #256

Open
robinkrahl opened this issue Sep 20, 2020 · 6 comments
Open
Labels
enhancement New feature or request
Milestone

Comments

@robinkrahl
Copy link

robinkrahl commented Sep 20, 2020

If a project uses multiple licenses, it is hard to get an overview of which files are under which license without manually inspecting the files. reuse lint only lists all used licenses, and while reuse spdx lists the license information for all files, it is rather hard to read for a human.

I think it would be good to have a reuse listcommand that prints a table with the copyright information for all files (or maybe report to increase the edit distance from lint) :

$ reuse list
File	License		Copyright Text
1.c	MIT		2020 John Doe
2.c	MIT		2020 John Doe
3.txt	CC0-1.0		2019 Jane Smith

It would be even better if the command could group files with the same copyright information:

$ reuse list
File	License		Copyright Text
*.c	MIT		2020 John Doe
3.txt	CC0-1.0		2019 Jane Smith

Use cases:

  1. Getting an overview of a third-party project.
  2. Making sure that you added the correct annotations for your own project.

I can try to implement this if you would merge it.

@mxmehl
Copy link
Member

mxmehl commented Sep 21, 2020

Indeed, that'd be a nice view, also for debugging.

Perhaps related to #183 since reuse spdx should already include all information. Outputting it as JSON (and/or YAML) would allow for a simpler manipulation that could also be done manually, e.g. with tools like jq.

@robinkrahl
Copy link
Author

Yes, using a separate parser for the reuse spdx output would also be a way to implement this. Does this mean you’d rather not have this feature in reuse-tool directly?

@mxmehl
Copy link
Member

mxmehl commented Sep 22, 2020

Does this mean you’d rather not have this feature in reuse-tool directly?

I am fine with having this function, either as a full list (as per your first post), or also with the option to have a detailed view for a single file (e.g. explaining the chain of precedence in case there are multiple explicit/glob coverages for this file).

Regarding spdx, I just wanted to make sure that we do not forget that users also may have this function to build their own custom query if necessary.

@mxmehl
Copy link
Member

mxmehl commented Jan 22, 2022

In today' hackathon we concluded that we would like to have this verbose listing as part of the lint subcommand, e.g. reuse lint --verbose, perhaps also combinable with --json.

Aside from the detected license and copyright it should also provide info on where this information has been derived from, e.g. the file itself, the .license file, or dep5 (or future REUSE.yaml).

@mxmehl mxmehl modified the milestones: 0.15.0, v0.15 Jan 22, 2022
@mxmehl mxmehl modified the milestones: Backlog, v1.1.0 Jun 1, 2022
@mxmehl mxmehl changed the title List the copyright information for all files Add flag to show derived copyright/licensing for specific files Jun 2, 2022
@mxmehl
Copy link
Member

mxmehl commented Jun 2, 2022

So us maintainers would like to see this feature in the next release.

What's unclear yet:

What we agreed on:

@mxmehl mxmehl changed the title Add flag to show derived copyright/licensing for specific files Add --verbose flag to lint, showing copyright/license info sources Aug 31, 2022
@mxmehl
Copy link
Member

mxmehl commented Aug 31, 2022

In today's call we clarified a few more questions:

  • The desired functionality shall happen via the --verbose flag to the lint subcommand, not to a separate subcommand.
  • It shall happen in the same step as Add --json flag to lint #183 as the --json flag shall imply --verbose already.

So this issue can be used to track the effort of adding the verbose output to the plain, human-readable output of reuse lint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants