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

feat: Extend lint-file to show which REUSE tags apply to the linted file(s) #1106

Open
silverhook opened this issue Nov 19, 2024 · 0 comments

Comments

@silverhook
Copy link
Contributor

Currently, reuse lint-file only checks if the file is covered by some REUSE tags. Which is a great feature!

What would be even better though is if it could output which REUSE tags (and ideally where they came from) apply to the file.

Use case:

  • massive code base with many un-commentable files
  • I use one glob in REUSE.toml for all *.txt files to say these files are under CC0-1.0
  • but use another glob in REUSE.toml (let’s keep it simple) for all docs/**/*.txt to say those specifically are under CC-BY-SA-4.0

Another use case:

  • I am trying to check how the cardinality setting in REUSE.toml affects the output.

In both cases I want to know which license (and copyright holder) the file docs/bla/toot.txt is under.

Relevant:
#1055
#1068


More time- and resource-intense workaround (faster with rg, but works with grep too):

reuse spdx > tmp_reuse.spdx
rg "docs/bla/toot.txt" tmp_reuse.spdx --after-context=6 --before-context=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant