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 lint encounters parse error when parsing a template #250

Closed
mdolling-gfz opened this issue Aug 14, 2020 · 1 comment
Closed

reuse lint encounters parse error when parsing a template #250

mdolling-gfz opened this issue Aug 14, 2020 · 1 comment

Comments

@mdolling-gfz
Copy link
Contributor

I have a project, where I use the following code block

{% for copyright_line in copyright_lines %}
{{ copyright_line }}
{% endfor %}

{% for expression in spdx_expressions %}
SPDX-License-Identifier: {{ expression }}
{% endfor %}

in a markdown file.

the linter fails with the following message:

reuse._util - ERROR - Could not parse '{{ expression'
reuse.report - ERROR - Unexpected error occurred while parsing '/repo/docs/pages/templates.md'

Proposed solution:
Escape documentation files (md, rst, txt) like the jinja2 templates itself.

@mxmehl
Copy link
Member

mxmehl commented Oct 23, 2020

Escape documentation files (md, rst, txt) like the jinja2 templates itself.

I am afraid we cannot do that. The idea is that all files have somehow copyright and licensing declared, and these files can definitely contain relevant content.

I think a better solution would again be to have an option to "overwrite" license/copyright with a .license file to avoid that the tool chokes on seemingly malformed tags, so basically #246.

And intermediary solution could be to somehow split SPDX-License-Identifier, e.g. by concatenating two strings.

@mxmehl mxmehl closed this as completed Oct 23, 2020
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