Update golangci-lint to v2.12.2 with canonical config (closes #60)
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
Adopts golangci-lint v2.12.2 and the canonical .golangci.yml (default: all), and fixes all resulting findings across the tree. Two intended behavior changes: absent MFFilePath.Mtime is handled explicitly in freshen, list and export rather than dereferenced (main panicked); gpg positional key IDs now follow an explicit -- end-of-options marker. All twelve reworded user-visible error messages restored to byte-identical parity with main and pinned by tests.
This commit was merged in pull request #59.
This commit is contained in:
@@ -7,15 +7,18 @@ import (
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
// NO_COLOR disables colored output when set. Automatically true if the
|
||||
// NoColor disables colored output when set. Automatically true if the
|
||||
// NO_COLOR environment variable is present (per https://no-color.org/).
|
||||
var NO_COLOR bool
|
||||
//
|
||||
//nolint:gochecknoglobals // process-wide setting derived from the environment
|
||||
var NoColor = noColorEnvSet()
|
||||
|
||||
func init() {
|
||||
NO_COLOR = false
|
||||
if _, exists := os.LookupEnv("NO_COLOR"); exists {
|
||||
NO_COLOR = true
|
||||
}
|
||||
// noColorEnvSet reports whether the NO_COLOR environment variable is
|
||||
// present.
|
||||
func noColorEnvSet() bool {
|
||||
_, exists := os.LookupEnv("NO_COLOR")
|
||||
|
||||
return exists
|
||||
}
|
||||
|
||||
// RunOptions contains all configuration for running the CLI application.
|
||||
@@ -64,5 +67,6 @@ func RunWithOptions(opts *RunOptions) int {
|
||||
}
|
||||
|
||||
m.run(opts.Args)
|
||||
|
||||
return m.exitCode
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user