termux-language-server icon indicating copy to clipboard operation
termux-language-server copied to clipboard

Add SPDX `LicenseRef-.*` for PKGBUILD's license

Open txtsd opened this issue 1 year ago • 4 comments

Which means SPDX license expressions, and LicenseRef-* for custom licenses, are possible.

Reference: https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/#composite-license-expressions https://spdx.org/licenses/exceptions-index.html

txtsd avatar Nov 07 '24 08:11 txtsd

https://github.com/termux/termux-language-server/issues/19#issuecomment-2199886707

It should support SPDX. I heard LicenseRef-* firstly. Sounds like all string match LicenseRef-.* are legal?

Freed-Wu avatar Nov 07 '24 08:11 Freed-Wu

Correct!

txtsd avatar Nov 07 '24 09:11 txtsd

But also SPDX expressions like MIT OR GPL-3.0-or-later WITH GPL-3.0-linking-source-exception are valid.

EDIT: along with parentheses

txtsd avatar Nov 07 '24 09:11 txtsd

SPDX expression looks a little complex. Now this project just use regex to match some legal string.

Freed-Wu avatar Nov 07 '24 10:11 Freed-Wu