licensecheck

The licensecheck package classifies license files and heuristically determines how well they correspond to known open source licenses.

  • 所有者: google/licensecheck
  • 平台:
  • 许可证: BSD 3-Clause "New" or "Revised" License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

The licensecheck package classifies license files and heuristically
determines how well they correspond to known open source licenses.

The design aims never to give a false positive. It uses a soft text
matching algorithm, though, which means it can miss valid licenses
that have been modified more than usual. It also recognizes licenses
identified by URL.

To use this package, the client first identifies a file or text
that might contain a license, then calls the Cover function for a
description of what licenses are present in the text. The description
returned by Cover lists the licenses in the order they appear in
the text. By convention in most open source repositories, the first
license present describes the main body of the work, while subsequent
licenses apply to borrowed subcomponents.

The output of go doc Cover and go doc Coverage provides more
information:

func Cover(input []byte, opts Options) (Coverage, bool)
    Cover computes the coverage of the text according to the license set
    compiled into the package.

    An input text may match multiple licenses. If that happens, Match contains
    only disjoint matches. If multiple licenses match a particular section of
    the input, the best match is chosen so the returned coverage describes at
    most one match for each section of the input.

type Coverage struct {
	// Percent is the fraction of the total text, in normalized words, that
	// matches any valid license, expressed as a percentage across all of the
	// licenses matched.
	Percent float64

	// Match describes, in sequential order, the matches of the input text
	// across the various licenses. Typically it will be only one match long,
	// but if the input text is a concatenation of licenses it will contain
	// a match value for each element of the concatenation.
	Match []Match
}
    Coverage describes how the text matches various licenses.

The licenses subdirectory contains canonical forms of the licenses
recognized by the package. The list covers most open source software
but is not comprehensive. More licenses may be added by copying
their text to the subdirectory as individual files and running go generate in the root.

主要指标

概览
名称与所有者google/licensecheck
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2019-04-15 23:50:20
推送于2024-04-14 19:19:16
最后一次提交
发布数5
最新版本名称v0.3.1 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数466
关注者数19
派生数79
提交数147
已启用问题?
问题数30
打开的问题数9
拉请求数12
打开的拉请求数9
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?