-
Notifications
You must be signed in to change notification settings - Fork 148
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
Inconsistency between the tool behaviour and the spec #868
Comments
I'm not sure whether we ever discussed that, but I am pretty sure we've never meant to make it mandatory to have the headers starting at line 1. At least that's how we live it as well, and the tool itself - as a reference implementation of the spec - even supports adding these headers in subsequent lines, e.g. with bash shebangs or if a comment header already exists. What we live in practice is to have the comment headers somewhere at the top, so the topmost comment section. This could even be line 20 like with curl. The rationale is that the REUSE information must be understandable (and also findable) for humans as well. So hiding it at the bottom of the file is not an option. @carmenbianca, if you agree to my analysis, we could improve the wording in the spec. |
I am of the opinion that any specification benefits from having as little ambiguity as possible. Hopefully, newer versions of the REUSE spec will keep this fact in consideration. |
This is a spec issue, yes. A few thoughts that aren't well-connected:
But let's indeed fix this in fsfe/reuse-docs#133 |
reuse CLI version: 2.1.0.
Platform: Windows 10 x86-64.
Version 3.0 of the REUSE specification states the following:
According to the first sentence in bold, the reuse header can only be present in-file when it starts at the top, presumably at line 1. However, in one of the projects I am contributing to, Zola is used to generate a static website and, this site generator, requires what's called a TOML front matter at the top of content Markdown files to build without errors.
If no reuse information is present in one of these files and the
reuse annotate
command is used, information will be added at line 1 and Zola will fail to build. That's expected. However, if the reuse information was added (e.g. manually) after the TOML front matter, thereuse annotate
tool will modify that reuse block fine.For example:
If you run the following command in a PowerShell terminal:
The reuse CLI tool will change the file to:
If the specification states that the reuse header MUST be at the top of the file, I would expect the
reuse annotate
tool to give either a warning or an error in these cases. Otherwise, a more suitable interpretation for the specification would be SHOULD instead of MUST.Using separate
*.license
files is what we decided to do. This type of Markdown files allows the inclusion of comments, so the second sentence in bold in the quotation could be clarified to state use of separate*.license
files for those files that do not permit inclusion of comments at the top of their contents.The text was updated successfully, but these errors were encountered: