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

reuse annotate won't add headers having *.commented.jinja2 template #1049

Open
zaufi opened this issue Jul 13, 2024 · 2 comments
Open

reuse annotate won't add headers having *.commented.jinja2 template #1049

zaufi opened this issue Jul 13, 2024 · 2 comments

Comments

@zaufi
Copy link

zaufi commented Jul 13, 2024

Trying to annotate an executable bash script w/o *.sh extension I've got an error message:

$ reuse annotate --template hash --license CC0-1.0 --copyright '' --merge-copyrights --copyright-prefix spdx ./my-script

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:

my-script

However, having a template with proper comments reuse shouldn't even try to detect comments style for the given file (IMHO):

$ ll .reuse/templates/
.rw-r--r-- 286 exher exher 14 Jul 02:30 hash.commented.jinja2
.rw-r--r-- 119 exher exher 11 Jul 03:59 hash.commented.jinja2.license
@zaufi zaufi closed this as completed Jul 30, 2024
@carmenbianca
Copy link
Member

I don't think this should be closed. This seems like a bug to me!

@carmenbianca carmenbianca reopened this Jul 30, 2024
@zaufi
Copy link
Author

zaufi commented Jul 30, 2024

I don't think this should be closed. This seems like a bug to me!

Working w/ REUSE a bit more I've realized (didn't dig into sources, just my guess) that from the commented template it's not possible to get a comment style for a file. Meanwhile, REUSE should parse the given file to "understand" the copyright header which is normally a comment...

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

2 participants