fsfe / reuse-tool

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

Better headers for restructured text (rst) files #597

Open zyzzyxdonta opened 1 year ago

zyzzyxdonta commented 1 year ago

Hi!

The headers for rst files should look more like this example right from this very repo: https://github.com/fsfe/reuse-tool/blob/e7040863a265db9b2314a2f29b3fcfd59f5cae51/docs/authors.rst (though maybe indented by 3 rather than 4 spaces)

Currently, the reuse tool produces headers that look like this:

.. SPDX-FileCopyrightText: 2017 Free Software Foundation Europe e.V. <https://fsfe.org>
..
.. SPDX-License-Identifier: CC-BY-SA-4.0

While this is interpreted correctly as a comment by all tools I personally use, it is not very well supported by syntax highlighters which makes me think it might not be to spec.

Thanks!

carmenbianca commented 1 year ago

Thank you for filling this issue!

I'd love to implement your proposal, and it was on my mind at the time, but it's unfortunately non-trivial to parse using the existing logic we have.

It may be a while until someone tackles this issue, but I'll backlog it.