An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/google/licensecheck

Package licensecheck classifies license files and heuristically determines how well they correspond to known open source licenses. A text (a slice of bytes) can be scanned for known licenses by calling Scan. The resulting Coverage structure describes all the matches found as well as what percentage of the file was covered by known matches. The Scan function uses a built-in license set, which is the known SPDX licenses augmented with some other commonly seen licenses. (See licenses/README.md for details about the license set.) A custom scanner can be created using NewScanner, passing in a set of license patterns to scan for. The license patterns are written as license regular expressions (LREs). BuiltinLicenses returns the set of license patterns used by Scan. License Regular Expressions Each license to be recognized is specified by writing a license regular expression (LRE) for it. The pattern syntax and the matching are word-based and case-insensitive; punctuation is ignored in the pattern and in the matched text. The valid LRE patterns are: To make patterns harder to misread in large texts: (( must only appear at the start of a line (possibly indented); )) and ))?? must only appear at the end of a line (with possible trailing spaces); and || must only appear inside a (( )) or (( ))?? group. For example: An older, less precise matcher using the names Cover, New, and Checker was removed from this package. Use v0.1.0 for the final version of that API.

Ecosystem
proxy.golang.org
Latest Release
v0.3.1
over 5 years ago
Versions
5
Dependent Packages
199
Dependent Repos
108
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/google/licensecheck
spec
License BSD-3-Clause
Namespace github.com/google
First Release over 5 years ago
Last Synced 2 days ago
Repository
Stars 480 on GitHub
Forks 85 on GitHub
Docker Dependents 230
Docker Downloads 234,014,809
Rankings on proxy.golang.org
Overall Top 1.5%
Dependent packages Top 0.7%
Dependent repos Top 0.6%
Forks Top 2.9%
Docker downloads Top 0.2%