Skip to content

Commit

Permalink
fix: excludeSuffixes wasn't skipping any files (#120)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira authored and andrewrynhard committed Mar 27, 2019
1 parent 37e0e69 commit c539351
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/policy/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (l *License) Compliance(options *policy.Options) (report policy.Report) {
// Skip excluded suffixes.
for _, suffix := range l.ExcludeSuffixes {
if strings.HasSuffix(info.Name(), suffix) {
continue
return nil
}
}
// Check files matching the included suffixes.
Expand All @@ -57,6 +57,7 @@ func (l *License) Compliance(options *policy.Options) (report policy.Report) {
return nil
}
ValidateLicenseHeader(&report, info.Name(), contents, []byte(l.Header))
return nil
}
}
}
Expand Down

0 comments on commit c539351

Please sign in to comment.