Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadModFile ¶
ReadModFile return info from file go.mod.
Types ¶
type Config ¶
type Config struct { NoNoLint NoNoLint `yaml:"NoNoLint"` NoGoroutine DefaultLinter `yaml:"NoGoroutine"` NoLength DefaultLinter `yaml:"NoLength"` NoDefer DefaultLinter `yaml:"NoDefer"` NoDoc DefaultLinter `yaml:"NoDoc"` NoInit DefaultLinter `yaml:"NoInit"` NoGeneric DefaultLinter `yaml:"NoGeneric"` NoPrefix DefaultLinter `yaml:"NoPrefix"` NoUnderscore DefaultLinter `yaml:"NoUnderscore"` NoObject DefaultLinter `yaml:"NoObject"` NoEmbedding DefaultLinter `yaml:"NoEmbedding"` }
func ReadFromBytes ¶
ReadFromBytes load config from bytes.
func ReadFromFile ¶
ReadFromFile load config file `.golimiter.yaml` or stdin.
type DefaultLinter ¶
type DefaultLinter struct { ExcludeHashs []ExcludeHash `yaml:"ExcludeHashs"` ExcludeNames []ExcludeName `yaml:"ExcludeNames"` ExcludeFiles []string `yaml:"ExcludeFiles"` ExcludeFolders []string `yaml:"ExcludeFolders"` Info `yaml:"Info"` }
func (DefaultLinter) IsVerifyHash ¶
func (c DefaultLinter) IsVerifyHash(hash string) bool
func (DefaultLinter) IsVerifyName ¶
func (c DefaultLinter) IsVerifyName(path, name string) bool
type ExcludeHash ¶
type ExcludeHash struct { Hash string `yaml:"Hash"` Before time.Time `yaml:"Before"` Comment string `yaml:"Comment"` }
func (ExcludeHash) IsVerify ¶
func (eh ExcludeHash) IsVerify(hash string) bool
type ExcludeName ¶
type ExcludeName struct { Name string `yaml:"Name"` Path string `yaml:"Path"` Before time.Time `yaml:"Before"` Comment string `yaml:"Comment"` }
func (ExcludeName) IsVerify ¶
func (en ExcludeName) IsVerify(path, name string) bool
type ExcludeNameNoNoLint ¶
type ExcludeNameNoNoLint struct { Position ExcludeName `yaml:"Position"` Linters []string `yaml:"Linters"` }
type Info ¶
type NoNoLint ¶
type NoNoLint struct { ExcludeHashs []ExcludeHash `yaml:"ExcludeHashs"` ExcludeNames []ExcludeNameNoNoLint `yaml:"ExcludeNames"` ExcludeFiles []string `yaml:"ExcludeFiles"` ExcludeFolders []string `yaml:"ExcludeFolders"` Info `yaml:"Info"` }
func (NoNoLint) IsVerifyHash ¶
Click to show internal directories.
Click to hide internal directories.