Skip to content

Commit

Permalink
all: remove unit tests for staticcheck, unparam, and spellcheck
Browse files Browse the repository at this point in the history
Those should not be unit tests and, more importantly, they should not be
running on builders.

Change-Id: I70504fedce3bad17ac408dc6f208d61fb7bd6071
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/587097
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
zpavlinovic committed May 21, 2024
1 parent 6b0fd56 commit 486fd23
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
22 changes: 0 additions & 22 deletions all_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"golang.org/x/mod/modfile"
"golang.org/x/vuln/internal/testenv"
"golang.org/x/vuln/scan"
"mvdan.cc/unparam/check"
)

// excluded contains the set of modules that x/vuln should not depend on.
Expand Down Expand Up @@ -83,22 +82,6 @@ func TestGovulncheck(t *testing.T) {
}
}

func TestStaticCheck(t *testing.T) {
skipIfShort(t)
rungo(t, "run", "honnef.co/go/tools/cmd/staticcheck@v0.4.3", "./...")
}

func TestUnparam(t *testing.T) {
testenv.NeedsGoBuild(t)
warns, err := check.UnusedParams(false, false, false, "./...")
if err != nil {
t.Fatalf("check.UnusedParams: %v", err)
}
for _, warn := range warns {
t.Errorf(warn)
}
}

func TestVet(t *testing.T) {
rungo(t, "vet", "-all", "./...")
}
Expand All @@ -107,11 +90,6 @@ func TestGoModTidy(t *testing.T) {
rungo(t, "mod", "tidy")
}

func TestMisspell(t *testing.T) {
skipIfShort(t)
rungo(t, "run", "github.com/client9/misspell/cmd/misspell@v0.3.4", "-error", ".")
}

func TestHeaders(t *testing.T) {
sfs := os.DirFS(".")
fs.WalkDir(sfs, ".", func(path string, d fs.DirEntry, _ error) error {
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
golang.org/x/mod v0.17.0
golang.org/x/sync v0.7.0
golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7
mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8
)

require github.com/google/renameio v0.1.0 // indirect
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7 h1:DnP3aRQn/r68glNGB8/7+3iE77jA+YZZCxpfIXx2MdA=
golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8 h1:VuJo4Mt0EVPychre4fNlDWDuE5AjXtPJpRUWqZDQhaI=
mvdan.cc/unparam v0.0.0-20230312165513-e84e2d14e3b8/go.mod h1:Oh/d7dEtzsNHGOq1Cdv8aMm3KdKhVvPbRQcM8WFpBR8=

0 comments on commit 486fd23

Please sign in to comment.