fsfe / reuse-tool

reuse is a tool for compliance with the REUSE recommendations.
https://reuse.software
412 stars 150 forks source link

add style sh (shell) #1110

Open xenoterracide opened 4 days ago

xenoterracide commented 4 days ago
reuse annotate --license 'MIT' --copyright 'Caleb Cushing' --copyright-prefix spdx-string-symbol --merge-copyrights --style sh .config/git/hooks/*
Error: Invalid value for '--style' / '-s': 'sh' is not one of 'applescript', 'aspx', 'bat', 'bibtex', 'c', 'cpp', 'cppsingle', 'f', 'ftl', 'handlebars', 'haskell', 'html', 'jinja', 'julia', 'lisp', 'm4', 'ml', 'f90', 'plantuml', 'python', 'rst', 'semicolon', 'tex', 'man', 'vst', 'vim', 'xquery'.
#!/bin/sh

[ -n "$CI" ] && exit 0

npx lint-staged

the output I would expect

#!/bin/sh
# SPDX-FileCopyrightText: Copyright © 2024 Caleb Cushing
#
# SPDX-License-Identifier: MIT
[ -n "$CI" ] && exit 0

npx lint-staged
reuse, version 5.0.2

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
carmenbianca commented 3 days ago

The style you are looking for is called python. This is poorly documented here: https://reuse.readthedocs.io/en/stable/api/reuse.comment.html

The documentation could be better…