Skip to content

Commit bcb5c21

Browse files
committed
chore: clean
1 parent 2528e86 commit bcb5c21

File tree

3 files changed

+26
-35
lines changed

3 files changed

+26
-35
lines changed

.golangci.example.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ linters-settings:
66
# Description is optional
77
description: The description of the linter. This is optional, but shows up when running `golangci-lint linters`.
88
# Original-url is optional, and is only used for documentation purposes.
9-
original-url: github.com/golangci/example-linter
9+
original-url: github.com/golangci/example-plugin-linter
1010
settings:
1111
one: Foo
1212
two:

example_test.go

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package linters
2+
3+
import (
4+
"path/filepath"
5+
"runtime"
6+
"testing"
7+
8+
"github.com/stretchr/testify/require"
9+
"golang.org/x/tools/go/analysis/analysistest"
10+
)
11+
12+
func TestTodoAnalyzer(t *testing.T) {
13+
analysistest.Run(t, testdataDir(t), TodoAnalyzer, "testlintdata/todo")
14+
}
15+
16+
func testdataDir(t *testing.T) string {
17+
t.Helper()
18+
19+
_, testFilename, _, ok := runtime.Caller(1)
20+
if !ok {
21+
require.Fail(t, "unable to get current test filename")
22+
}
23+
24+
return filepath.Join(filepath.Dir(testFilename), "testdata")
25+
}

lint_test.go

-34
This file was deleted.

0 commit comments

Comments
 (0)