fsfe / reuse-tool

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

Use non-multi-line comments when multi-line are not supported #914

Open BigBlueHat opened 8 months ago

BigBlueHat commented 8 months ago

Currently an error is thrown...which stops all progress and means a different command must be used for various file extensions...which prevents use of --recursive: https://github.com/fsfe/reuse-tool/blob/00a8d949b245218541fd0ece8a64c5480a9e84d7/src/reuse/_annotate.py#L77-L83

Given that non-multi-line files only support single line comments, there's no reason to stop the command completely. Instead, --multi-line could be described as "use multi-line comments when available".

carmenbianca commented 8 months ago

This seems fair to me. Thank you for the feedback!

BigBlueHat commented 8 months ago

I think it may also be good to make --multi-line the default once it doesn't fail on non-supporting filetypes (per thoughts in #916).