envvarlinter

command
v0.0.0-...-1a56975 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

envvarlinter

envvarlinter ensures that non-test files don't use os.Getenv and os.LookupEnv and instead use the functions from pkg/env.

envvarlinter is based on Checker, and this package provides the custom rules implementation.

Whitelist

If, for some reason, you want to disable lint rule for a file, you can add the file path and rule ID in whitelist.go. Rule ID is the name of that rule file without .go extension. You could also specify file path in regex.

If you want to disable all rules for a file path, you can specify * as the ID.

Example:

var Whitelist = map[string][]string{
    "/istio/mixer/pkg/*": {"skip_issue", "short_skip"},
    "/istio/pilot/pkg/simply_test.go": {"*"},
}

Running testlinter

There are two ways to run this linter.

go install 
testlinter <target path>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL