-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add filter for matlab files #604
Comments
Thanks for that insight @jonasstein There was already an issue open on supporting Matlab/Octave files #357 but that issue didn't speak of the preview. To clarify, is this also true for comments on the top of the file? The documentation you linked shows an example of documentation below a function, but not at the top of a file. One way to deal with this is to check if a comment block is present at the top of the file, and if so place SPDX headers below it. Would that work? Something like: % This script does awesome stuff.
% Pass in the necessary parameters to make it work.
% This section is intended for preview and is skipped over by REUSE tool.
% SPDX-FileCopyrightText: 2022 Person <person@server.org>
%
% SPDX-License-Identifier: GPL-3.0-or-later
function answer = important_question()
% This is function documentation, REUSE doesn't care about this.
answer = 42 Thanks to the linked documentation I was able to confirm the comment style conclusion from the other issue: https://de.mathworks.com/help/matlab/matlab_prog/comments.html |
@nicorikken Yes. There is a fruitful suggestion from the matlab staff on |
Matlab files (source code ends with
.m
comment is%
) are not covered by reuse yet.Matlab interprets the first lines of the code and the following comments in a preview function to help the to see what the function is good for.
If we add the license information in the first lines of the comment, the important preview renders unusable.
How should we use
SPDX
with matlab files, as the first comment lines after function are reserved for short documentation?https://de.mathworks.com/help/matlab/matlab_prog/add-help-for-your-program.html
Please add a filter to reuse, so we can use it easily.
The text was updated successfully, but these errors were encountered: