NewLinter returns Linter for given confFilePath
(conf *lint.Config)
| 9 | |
| 10 | // NewLinter returns Linter for given confFilePath |
| 11 | func NewLinter(conf *lint.Config) (*lint.Linter, error) { |
| 12 | err := checkIfMinVersion(conf.MinVersion) |
| 13 | if err != nil { |
| 14 | return nil, err |
| 15 | } |
| 16 | |
| 17 | rules, err := GetEnabledRules(conf) |
| 18 | if err != nil { |
| 19 | return nil, err |
| 20 | } |
| 21 | |
| 22 | return lint.New(conf, rules) |
| 23 | } |
| 24 | |
| 25 | // GetFormatter returns the formatter as defined in conf |
| 26 | func GetFormatter(conf *lint.Config) (lint.Formatter, error) { |