Depscheck.Compatibility (Depscheck v1.0.12)
View SourceChecks license compatibility between project and dependencies.
Implements the compatibility rules defined in LICENSE_COMPATIBILITY_RULES.md
Summary
Functions
Checks all dependencies against the project license.
Checks if a dependency license is compatible with the project license.
Functions
@spec check_all( String.t() | nil, [Depscheck.Types.dependency()], Depscheck.Types.config() ) :: Depscheck.Types.check_result()
Checks all dependencies against the project license.
Returns a check_result map with status and violations.
@spec check_compatibility(String.t() | nil, String.t()) :: :compatible | {:incompatible, String.t()}
Checks if a dependency license is compatible with the project license.
Returns :compatible or {:incompatible, reason}.
Examples
iex> Depscheck.Compatibility.check_compatibility("MIT", "Apache-2.0")
:compatible
iex> Depscheck.Compatibility.check_compatibility("MIT", "GPL-3.0")
{:incompatible, "Strong copyleft license GPL-3.0 cannot be used in permissive project"}