fsfe / reuse-tool

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

Failing to extract license and copyright information from SVD files #933

Open rettichschnidi opened 3 months ago

rettichschnidi commented 3 months ago

Problem

Reuse does detect neither the copyright (Copyright (c) 2010 - 2024, Nordic Semiconductor ASA All rights reserved.) nor the license (SPDX-License-Identifier: BSD-3-Clause) in nrf52840.svd.

It seems like the "\n" at the end of each line causes the problem. For files without those line endings, e.g. nrf5340_network.svd, the detection oft the license and copyright works.

Hints

According to the example given by ARM, the inventor of CMSIS-SVD, seems to be the (a) proper way to encode line breaks. For this reason, I think REUSE should support it.

Workarounds

nicorikken commented 2 months ago

Thanks for reporting. Manual line endings in a file with line endings seems odd, but I can see how this ensures line endings are preserved.

An enhancement might be for all XML comment styles or even all files to handle these explicit '\n' line endings in addition to default line endings.