Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GoLicenserImportPath controls the import path used to install go-licenser. GoLicenserImportPath = "github.com/elastic/go-licenser" // GoNoticeGeneratorImportPath controls the import path used to install go-licence-detector. GoNoticeGeneratorImportPath = "go.elastic.co/go-licence-detector" )
Functions ¶
func CheckNoChanges ¶ added in v0.2.1
func CheckNoChanges() error
func GenerateNotice ¶ added in v0.2.0
func GitDiff ¶ added in v0.2.1
func GitDiff() error
GitDiff runs 'git diff' and writes the output to stdout.
func GitDiffIndex ¶ added in v0.2.1
GitDiffIndex returns a list of files that differ from what is committed. These could file that were created, deleted, modified, or moved.
func InstallGoLicenser ¶ added in v0.2.0
func InstallGoLicenser() error
InstallGoLicenser target installs go-licenser
func InstallGoNoticeGen ¶ added in v0.2.0
func InstallGoNoticeGen() error
InstallGoLicenser target installs go-licenser
Types ¶
type Deps ¶
Deps contains targets related to checking dependencies
func (Deps) CheckModuleTidy ¶
CheckModuleTidy checks if `go mod tidy` was run before the last commit.
type Linter ¶
Linter contains targets related to linting the Go code
func (Linter) CheckConfig ¶
CheckConfig makes sure that the `.golangci.yml` does not have uncommitted changes
func (Linter) ForceInstall ¶ added in v0.2.10
ForceInstall force installs the linter regardless of whether it exists or not.
func (Linter) Install ¶
Install installs golangci-lint (https://golangci-lint.run) to `./build` using the official installation script downloaded from GitHub. If the linter binary already exists does nothing.
func (Linter) LastChange ¶
LastChange runs the linter against all files changed since the fork point from `main`. If the current branch is `main` then runs against the files changed in the last commit.