Skip to content

Commit 521ea74

Browse files
committed
tests: isolate exclude_rules files
1 parent 7352ac4 commit 521ea74

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

pkg/result/processors/exclude_rules_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func TestExcludeRules_multiple(t *testing.T) {
6060
{Path: "e_test.go", Text: "testonly", Linter: "linter"},
6161
{Path: "e.go", Text: "nontestonly", Linter: "linter"},
6262
{Path: "e_test.go", Text: "nontestonly", Linter: "linter"},
63-
{Path: filepath.Join("testdata", "exclude_rules.go"), Line: 3, Linter: "lll"},
63+
{Path: filepath.FromSlash("testdata/exclude_rules/exclude_rules.go"), Line: 3, Linter: "lll"},
6464
}
6565

6666
var issues []result.Issue
@@ -219,7 +219,7 @@ func TestExcludeRules_caseSensitive_multiple(t *testing.T) {
219219
{Path: "e_test.go", Text: "another", Linter: "linter"},
220220
{Path: "e_test.go", Text: "testonly", Linter: "linter"},
221221
{Path: "e_test.go", Text: "testOnly", Linter: "linter"},
222-
{Path: filepath.Join("testdata", "exclude_rules_case_sensitive.go"), Line: 3, Linter: "lll"},
222+
{Path: filepath.FromSlash("testdata/exclude_rules/case_sensitive.go"), Line: 3, Linter: "lll"},
223223
}
224224

225225
var issues []result.Issue
@@ -245,7 +245,7 @@ func TestExcludeRules_caseSensitive_multiple(t *testing.T) {
245245
{Path: "e_Test.go", Text: "normal", Linter: "testlinter"},
246246
{Path: "e_test.go", Text: "another", Linter: "linter"},
247247
{Path: "e_test.go", Text: "testOnly", Linter: "linter"},
248-
{Path: filepath.Join("testdata", "exclude_rules_case_sensitive.go"), Line: 3, Linter: "lll"},
248+
{Path: filepath.FromSlash("testdata/exclude_rules/case_sensitive.go"), Line: 3, Linter: "lll"},
249249
}
250250

251251
assert.Equal(t, expectedCases, resultingCases)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package exclude_rules
2+
3+
// GO:generate long line that will be excluded by default processor but will not be affected by case-sensitive one because of capital GO

pkg/result/processors/testdata/exclude_rules.go renamed to pkg/result/processors/testdata/exclude_rules/exclude_rules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package testdata
1+
package exclude_rules
22

33
//go:generate --long line --with a --lot of --arguments --that we --would like --to exclude --from lll --issues --by exclude-rules
44

pkg/result/processors/testdata/exclude_rules_case_sensitive.go

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)