Skip to content

Commit

Permalink
Remove extra contional + fix identation
Browse files Browse the repository at this point in the history
  • Loading branch information
Marina Limeira committed Sep 28, 2021
1 parent 43bcacb commit b0add83
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,14 @@ func ShouldInclude(name string, includeREs []Expression, excludeREs []Expression
// If no rules are defined, should always include
if len(includeREs) == 0 && len(excludeREs) == 0 {
return true
// If a rule that exclude matches, should not include
// If a rule that exclude matches, should not include
} else if matches(name, excludeREs) {
return false
// Given the 'name' is not in the 'exclude' list, should include if there is no 'include' list
// Given the 'name' is not in the 'exclude' list, should include if there is no 'include' list
} else if len(includeREs) == 0 {
return true
// Given there is a 'include' list, and 'name' is there, should include
} else if matches(name, includeREs) {
return true
// If it's not in the 'include' list, should not include
// Given there is a 'include' list, and 'name' is there, should include
} else {
return false
return matches(name, includeREs)
}
}

0 comments on commit b0add83

Please sign in to comment.