woodpecker/vendor/github.com/leonklingele/grouper/pkg/analyzer/flags.go
6543 56a854fe14
Update deps (#789)
* update github.com/docker/cli

* update github.com/docker/distribution

* update github.com/docker/docker

* update github.com/gin-gonic/gin

* update github.com/golang-jwt/jwt/v4

* update github.com/golangci/golangci-lint

* update github.com/gorilla/securecookie

* update github.com/mattn/go-sqlite3

* update github.com/moby/moby

* update github.com/prometheus/client_golang

* update github.com/xanzy/go-gitlab
2022-02-24 17:33:24 +01:00

37 lines
1.4 KiB
Go

package analyzer
import (
"flag"
)
const (
FlagNameConstRequireSingleConst = "const-require-single-const"
FlagNameConstRequireGrouping = "const-require-grouping"
FlagNameImportRequireSingleImport = "import-require-single-import"
FlagNameImportRequireGrouping = "import-require-grouping"
FlagNameTypeRequireSingleType = "type-require-single-type"
FlagNameTypeRequireGrouping = "type-require-grouping"
FlagNameVarRequireSingleVar = "var-require-single-var"
FlagNameVarRequireGrouping = "var-require-grouping"
)
func Flags() flag.FlagSet {
fs := flag.NewFlagSet(Name, flag.ExitOnError)
fs.Bool(FlagNameConstRequireSingleConst, false, "require the use of a single global 'const' declaration only")
fs.Bool(FlagNameConstRequireGrouping, false, "require the use of grouped global 'const' declarations")
fs.Bool(FlagNameImportRequireSingleImport, false, "require the use of a single 'import' declaration only")
fs.Bool(FlagNameImportRequireGrouping, false, "require the use of grouped 'import' declarations")
fs.Bool(FlagNameTypeRequireSingleType, false, "require the use of a single global 'type' declaration only")
fs.Bool(FlagNameTypeRequireGrouping, false, "require the use of grouped global 'type' declarations")
fs.Bool(FlagNameVarRequireSingleVar, false, "require the use of a single global 'var' declaration only")
fs.Bool(FlagNameVarRequireGrouping, false, "require the use of grouped global 'var' declarations")
return *fs
}