Skip to content

lint: TestStaticCheck lint failures in mirror.go #72521

@rickystewart

Description

@rickystewart

pkg/cmd/mirror fails the lints in TestStaticCheck with the following errors:

------- Stdout: -------
=== RUN   TestLint/TestStaticCheck
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:27:6: type downloadedModule is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:34:6: type listedModule is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:40:6: func copyFile is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:76:6: func downloadZips is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:103:6: func listAllModules is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:157:6: func dumpPatchArgsForRepo is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:175:6: func buildFileProtoModeForRepo is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:182:6: func dumpBuildNamingConventionArgsForRepo is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:188:6: func dumpNewDepsBzl is unused (U1001)
lint_test.go:1710:
pkg/cmd/mirror/mirror.go:225:4: this value of replaced is never used (SA4006)
--- FAIL: TestLint/TestStaticCheck (631.01s)

As far as I can tell, these are ALL false positives. All of these functions are trivially used in mirror.go. I'm skipping the file for TestStaticCheck until we can figure out what's going on.

Epic CRDB-8306

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintersC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-dev-inf

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions