Skip to content

build: pin go1.27-compatible linters and enable staticcheck/unused (dead code went undetected for 6 months) #123

Closed

Description

@ezynda3

Summary

The dead code in #119 accumulated over 3–6 months without detection because the linter configuration does not run the checks that would have caught it, and the locally installed analysis tools are broken by a toolchain mismatch.

Current state

.golangci.yml enables only modernize (plus the gofmt formatter):

linters:
  enable:
    - modernize

Broken tooling

go.mod declares go 1.27.0, but prebuilt analysis binaries on PATH were compiled with go1.26 and fail on every package:

  • staticcheck (installed): package requires newer Go version go1.27 (application built with go1.26) and internal error in importing "cmp" ... export data version 4 is greater than maximum supported version 2
  • deadcode (installed): same import errors; deadcode@latest additionally panics with a nil-deref in golang.org/x/tools/go/callgraph/rta (x/tools v0.49.0)

Running staticcheck@latest via go run works correctly and reports zero findings at default checks, so the codebase is clean — the tools simply were not running.

Proposed

  1. Pin the analysis toolchain to a go1.27-compatible version so it runs in CI rather than depending on whatever is on a developer's PATH.
  2. Enable staticcheck and unused in .golangci.yml. unused (U1000) covers unexported symbols; note it will not flag exported symbols in internal/, which is how the chore: remove 18 dead exported symbols in internal/ #119 batch survived — consider a periodic AST cross-reference or an unused-with-exported-is-used=false style check scoped to internal/.
  3. Optionally add staticcheck -checks=all as a non-blocking advisory job (it currently reports only ST1000 package-comment nits).

Housekeeping

kit_multi_stderr.log (0 bytes) is an untracked artifact in the repo root; kit_stderr2.log is gitignored but also present. Both can be removed.

Activity

  1. added
    enhancement
    on Sep 4, 2026
  2. mark-iii-labs-huly commented on Sep 4, 2026

    @mark-iii-labs-huly

    Connected to Huly®: KIT-124

  3. added a commit that references this issue on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions