diff --git a/lint/linter.go b/lint/linter.go index 3f451fe81..6dcdb33d2 100644 --- a/lint/linter.go +++ b/lint/linter.go @@ -172,7 +172,7 @@ func detectGoMod(dir string) (rootDir string, ver *goversion.Version, err error) } ver, err = goversion.NewVersion(modAst.Go.Version) - return dir, ver, err + return path.Dir(modFileName), ver, err } func retrieveModFile(dir string) (string, error) {