Skip to content

Commit

Permalink
feat: ignore vendor if no exclude set
Browse files Browse the repository at this point in the history
  • Loading branch information
mfederowicz committed Oct 6, 2024
1 parent d76ffb9 commit e76ab12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions revivelib/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e76ab12

Please sign in to comment.