Skip to content

Conversation

@fredrikekre
Copy link
Member

This adds a new action for adding a SPDX short form identifier0 to the
top of the file. The action is active when cursor is at the first line
of the file.

To find the correct license identifer the action first checks in the
tracked documents for existing identifers. This code path supports any
valid identifer for any license. If no such headers are found, the
action falls back to looking in license files in the current workspace
folders. Identification from the license file is currently done by a
heuristic, but this should be OK since the action is invoked by a human,
and not done automatically. Currently only MIT license can be detected
through license files.

This adds a new action for adding a SPDX short form identifier[0] to the
top of the file. The action is active when cursor is at the first line
of the file.

To find the correct license identifer the action first checks in the
tracked documents for existing identifers. This code path supports any
valid identifer for any license. If no such headers are found, the
action falls back to looking in license files in the current workspace
folders. Identification from the license file is currently done by a
heuristic, but this should be OK since the action is invoked by a human,
and not done automatically. Currently only MIT license can be detected
through license files.

[0]: https://spdx.dev/ids/
@fredrikekre fredrikekre merged commit 559c7da into master May 10, 2022
@fredrikekre fredrikekre deleted the fe/spdx branch May 10, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants