octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56121] teach lexer to recognize "SPDX-License


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #56121] teach lexer to recognize "SPDX-License-Identifier" tag as a copyright comment
Date: Thu, 11 Apr 2019 14:21:19 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?56121>

                 Summary: teach lexer to recognize "SPDX-License-Identifier"
tag as a copyright comment
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Thu 11 Apr 2019 11:21:17 AM PDT
                Category: Interpreter
                Severity: 1 - Wish
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: mtmiller
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

The "SPDX-License-Identifier" tag is an attempt to create a machine-readable
standardized way to mark the license of a source file. Typically this
identifier is the first comment line in a source file, script, or data file.

https://spdx.org/using-spdx-license-identifier

Octave's lexer currently looks for the words "Author" or "Copyright" as the
first word in a comment block. I would like to add support for
"SPDX-License-Identifier" to serve the same purpose. I will submit an
already-tested patch once I have a bug number. This patch will allow a
function file that looks like this to work correctly:


## SPDX-License-Identifier: MIT
## Copyright (C) 2019 Mike Miller

## -*- texinfo -*-
## @deftypefn {} {} hello
## Print a hello world message.
## @end deftypefn

function hello ()
  disp ("Hello, world!")
endfunction


Without this patch, the 'help' function does not find the doc string
correctly, the user is forced to reorder the first two lines to put the
"Copyright" line first.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56121>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]