Skip to contents

Check whether a downstream package's SPDX is GPL-compatible

Usage

morie_check_plugin_license(plugin_spdx, raise_on_incompatible = FALSE)

Arguments

plugin_spdx

SPDX identifier (e.g. "MIT", "Apache-2.0").

raise_on_incompatible

If TRUE, throw an error rather than warning when the licence is not GPL-compatible.

Value

TRUE if compatible. Issues a warning (or error) otherwise.

Examples

morie_check_plugin_license("MIT")
#> [1] TRUE
# The error path, kept runnable via try():
try(morie_check_plugin_license("LicenseRef-Proprietary",
  raise_on_incompatible = TRUE
))
#> Error in morie_check_plugin_license("LicenseRef-Proprietary", raise_on_incompatible = TRUE) : 
#>   Plugin SPDX 'LicenseRef-Proprietary' is not on the FSF GPL-compatible list; linking against morie may violate GPL-2.0-only.