From a97aec174bc126407da4659f7ef103cbca6ea6d0 Mon Sep 17 00:00:00 2001 From: Irbe Krumina Date: Wed, 21 Jan 2026 16:11:55 +0000 Subject: [PATCH] path.{go,_test.go}: revert special casing staticcheck As of https://github.com/dominikh/go-tools/commit/0c74f99fbc9b50f6a279058f3f3aee5842b1656d we can skip special casing staticcheck.conf. Updates #17 Signed-off-by: Irbe Krumina --- path.go | 10 ---------- path_test.go | 3 --- 2 files changed, 13 deletions(-) diff --git a/path.go b/path.go index 8baede4..0a8c923 100644 --- a/path.go +++ b/path.go @@ -131,16 +131,6 @@ func parsePath(name string) (ret gmPath) { ret.NotExist = true return } - - // staticcheck walks the directory, looking for staticcheck.conf and - // does not stop at '@' - make sure we don't tell it that there is a - // foo/bar/staticcheck.conf directory that it will then attempt to parse - // as its config file. - // https://github.com/tailscale/gomodfs/issues/17 - if base == "staticcheck.conf" { - ret.NotExist = true - return - } return } escVer, path, _ := strings.Cut(verAndPath, "/") diff --git a/path_test.go b/path_test.go index 20fdfde..54d53ee 100644 --- a/path_test.go +++ b/path_test.go @@ -86,9 +86,6 @@ var pathTests = []struct { {path: "foo/bar/baz", want: gmPath{}}, {path: "foo/bar/baz", want: gmPath{}}, - // https://github.com/tailscale/gomodfs/issues/17 - {path: "github.com/go4.org/staticcheck.conf", want: gmPath{NotExist: true}}, - {path: "github.com/go4.org/mem/staticcheck.conf", want: gmPath{NotExist: true}}, { path: "github.com/go4.org/mem@v2.17.2/staticcheck.conf", want: gmPath{