Skip to content

Commit 7748b59

Browse files
committed
review
1 parent d9f91c5 commit 7748b59

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

pkg/config/base_rule.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (b *BaseRule) Validate(minConditionsCount int) error {
5959
}
6060

6161
if nonBlank < minConditionsCount {
62-
return fmt.Errorf("at least %d of (text, source, path[-except], linters) should be set", minConditionsCount)
62+
return fmt.Errorf("at least %d of (text, source, path[-except], linters) should be set", minConditionsCount)
6363
}
6464

6565
return nil

pkg/config/issues_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestExcludeRule_Validate(t *testing.T) {
3434
{
3535
desc: "empty rule",
3636
rule: &ExcludeRule{},
37-
expected: "at least 2 of (text, source, path[-except], linters) should be set",
37+
expected: "at least 2 of (text, source, path[-except], linters) should be set",
3838
},
3939
{
4040
desc: "only path rule",
@@ -43,7 +43,7 @@ func TestExcludeRule_Validate(t *testing.T) {
4343
Path: "test",
4444
},
4545
},
46-
expected: "at least 2 of (text, source, path[-except], linters) should be set",
46+
expected: "at least 2 of (text, source, path[-except], linters) should be set",
4747
},
4848
{
4949
desc: "only path-except rule",
@@ -52,7 +52,7 @@ func TestExcludeRule_Validate(t *testing.T) {
5252
PathExcept: "test",
5353
},
5454
},
55-
expected: "at least 2 of (text, source, path[-except], linters) should be set",
55+
expected: "at least 2 of (text, source, path[-except], linters) should be set",
5656
},
5757
{
5858
desc: "only text rule",
@@ -61,7 +61,7 @@ func TestExcludeRule_Validate(t *testing.T) {
6161
Text: "test",
6262
},
6363
},
64-
expected: "at least 2 of (text, source, path[-except], linters) should be set",
64+
expected: "at least 2 of (text, source, path[-except], linters) should be set",
6565
},
6666
{
6767
desc: "only source rule",
@@ -70,7 +70,7 @@ func TestExcludeRule_Validate(t *testing.T) {
7070
Source: "test",
7171
},
7272
},
73-
expected: "at least 2 of (text, source, path[-except], linters) should be set",
73+
expected: "at least 2 of (text, source, path[-except], linters) should be set",
7474
},
7575
{
7676
desc: "invalid path rule",

pkg/config/severity_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func TestSeverityRule_Validate_error(t *testing.T) {
136136
rule: &SeverityRule{
137137
Severity: "low",
138138
},
139-
expected: "at least 1 of (text, source, path[-except], linters) should be set",
139+
expected: "at least 1 of (text, source, path[-except], linters) should be set",
140140
},
141141
{
142142
desc: "invalid path rule",

pkg/result/processors/exclusion_paths.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (p *ExclusionPaths) Finish() {
9595
func (p *ExclusionPaths) shouldPassIssue(issue *result.Issue) bool {
9696
for _, pattern := range p.pathPatterns {
9797
if pattern.MatchString(issue.RelativePath) {
98-
p.excludedPathCounter[pattern] += 1
98+
p.excludedPathCounter[pattern]++
9999
return false
100100
}
101101
}
@@ -110,7 +110,7 @@ func (p *ExclusionPaths) shouldPassIssue(issue *result.Issue) bool {
110110
continue
111111
}
112112

113-
p.excludedPathExceptCounter[pattern] += 1
113+
p.excludedPathExceptCounter[pattern]++
114114
matched = true
115115
}
116116

0 commit comments

Comments
 (0)