Class: Licensee::Matchers::Cabal
- Defined in:
- lib/licensee/matchers/cabal.rb
Overview
Matches license identifiers in Cabal package files.
Constant Summary collapse
- LICENSE_REGEX =
While we could parse the cabal file, prefer a lenient regex for speed and security. Moar parsing moar problems. The “+” suffix is the pre-SPDX Cabal notation for “or-later” (e.g. GPL-2+).
/^\s*license\s*:\s*([a-z\-0-9.+]+)\s*$/ix- LICENSE_CONVERSIONS =
{ 'GPL-2' => 'GPL-2.0', 'GPL-3' => 'GPL-3.0', 'LGPL-3' => 'LGPL-3.0', 'AGPL-3' => 'AGPL-3.0', 'BSD2' => 'BSD-2-Clause', 'BSD3' => 'BSD-3-Clause' }.freeze
Constants inherited from Package
Constants inherited from Matcher
Instance Attribute Summary
Attributes inherited from Matcher
Method Summary
Methods inherited from Package
Methods inherited from Matcher
#confidence, #initialize, #match, #name
Methods included from HashHelper
Constructor Details
This class inherits a constructor from Licensee::Matchers::Matcher