Skip to content

Commit 501cc4a

Browse files
authored
feat: ignore vendor if no exclude set (#1058)
1 parent cea28f8 commit 501cc4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

revivelib/core.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ func (r *Revive) Lint(patterns ...*LintPattern) (<-chan lint.Failure, error) {
8282
if len(excludePatterns) == 0 { // if no excludes were set
8383
excludePatterns = r.config.Exclude // use those from the configuration
8484
}
85+
86+
// by default if no excludes exclude vendor
87+
if len(excludePatterns) == 0 {
88+
excludePatterns = []string{"vendor/..."}
89+
}
8590

8691
packages, err := getPackages(includePatterns, excludePatterns)
8792
if err != nil {

0 commit comments

Comments
 (0)