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 REUSE 3.2 compliance #374

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomodachi94
Copy link
Contributor

No description provided.

@tomodachi94
Copy link
Contributor Author

tomodachi94 commented Sep 8, 2024

Here is a Bash script that might help you review this PR:

#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2024 Tomodachi94
#
# SPDX-License-Identifier: MIT
# license_report.sh: show all files and their inline REUSE-specified licenses
# Requirements: bash, ripgrep (https://github.com/BurntSushi/ripgrep), the REUSE tool (https://github.com/fsfe/reuse-tool), and some POSIX utilities (sed, echo)
lint_output=$(reuse lint | rg -F "* Used licenses: " | sed 's/\* Used licenses\: //g')
IFS=',' read -ra LICENSES <<< "$lint_output"
echo "${LICENSES[@]}"
for license in "${LICENSES[@]}"; do
	echo "## $license"
	rg --hidden -lo "SPDX-License-Identifier\:.*$license.*" | sort | uniq
done

You'll need to install ripgrep and the REUSE tool to use the script.

This doesn't include the files listed in REUSE.toml, but that file should be fairly easy to review individually.

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

Successfully merging this pull request may close these issues.

1 participant