reuse-tool
reuse-tool copied to clipboard
`reuse annotate` doesn’t use `--style` if file extension isn’t recognised
Test case
With reuse init already run and where "CC0-1.0" is one of the used licenses:
touch test.txt
reuse annotate --copyright "me!" --license CC0-1.0 --style python ./test.txt
Expected outcome
test.txt would have a Python style header indicating "me!" as the author and CC0-1.0 as the license.
Actual outcome
reuse annotate: error: The following files do not have a recognised file extension. Please use --style, --force-dot-license, --fallback-dot-license, or --skip-unrecognised:
test.txt
Nothing is written to test.txt
Enviroment
> reuse --version
reuse 3.0.1
> distro
Name: Arch Linux
Version: rolling (n/a)
Codename: n/a
Oh, looks like this may be a partial duplicate of https://github.com/fsfe/reuse-tool/issues/902 and already have a fix waiting in https://github.com/fsfe/reuse-tool/pull/909 – curious that neither of those showed in my searches for previous reports. Ah well.
Not sure if you want to extract the first part of #902 into this one and then have #902 be only about Cargo.lock files, or if this one should just be closed as a duplicate.