Skip to content

Commit 61bd18e

Browse files
committed
Pass filepath to linter
Some of the checks are conditional based on the filepath. For example, this check skips files that end in `_test.go`: https://github.com/golang/lint/blob/206c0f020eba0f7fbcfbc467a5eb808037df2ed6/lint.go#L373-L375 Let's pass the filepath so the linter can make decisions such as that.
1 parent 5d9022e commit 61bd18e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

codeclimate-golint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func lintFile(fullPath string, relativePath string, minConfidence float64) {
5454
engine.PrintWarning(warning)
5555
}
5656

57-
problems, err := linter.Lint("", code)
57+
problems, err := linter.Lint(fullPath, code)
5858
if err != nil {
5959
warningDesc := fmt.Sprintf("Could not lint file (%s)", err)
6060
warning := &engine.Warning{

0 commit comments

Comments
 (0)