Documentation
¶
Overview ¶
Package golangci generates the golangci-lint configuration of a Go repository, so that a bare `golangci-lint run`, the generated `make lint` and the generated pre-commit hook all lint with the same linters.
Index ¶
Constants ¶
const ConfigFile = ".golangci.yaml"
ConfigFile is the configuration written to a repository that has none.
Variables ¶
var Linters = []string{"gosec", "goconst"}
Linters are the linters a generated Go repository lints with on top of golangci-lint's standard set.
Functions ¶
func Ensure ¶
Ensure returns content, the configuration read from path, with every linter of Linters added to linters.enable that the configuration does not already enable, disable or get from `linters.default: all`. Lines are inserted into content as they are, so comments and layout stay; a configuration that needs nothing is returned unchanged.
func IsUnsupportedConfig ¶
IsUnsupportedConfig asserts unsupportedConfigError.
Types ¶
This section is empty.