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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?