mirror of
https://github.com/mgechev/revive.git
synced 2024-11-21 17:16:40 +02:00
feat: ignore vendor if no exclude set (#1058)
This commit is contained in:
parent
cea28f882a
commit
501cc4a675
@ -82,6 +82,11 @@ func (r *Revive) Lint(patterns ...*LintPattern) (<-chan lint.Failure, error) {
|
||||
if len(excludePatterns) == 0 { // if no excludes were set
|
||||
excludePatterns = r.config.Exclude // use those from the configuration
|
||||
}
|
||||
|
||||
// by default if no excludes exclude vendor
|
||||
if len(excludePatterns) == 0 {
|
||||
excludePatterns = []string{"vendor/..."}
|
||||
}
|
||||
|
||||
packages, err := getPackages(includePatterns, excludePatterns)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user