Skip to content

charly/.golangci.yml omits nolintlint — a stale //nolint is undetectable (6 stale directives found; R4/R5) #774

Closed

Description

@aitrawog

Problem

charly/.golangci.yml — the curated AGENTS.md-compliance set — does not enable
nolintlint, so a //nolint directive that has outlived its justification (a stale
suppression) is undetectable. R4/R5 treat a suppression that no longer suppresses
anything as a real defect: it hides nothing yet advertises that something was worked
around, and it masks the next real finding the linter would have raised there.

Evidence (executed, golangci-lint v2.13.2, charly/.golangci.yml)

$ ( cd charly && golangci-lint run --enable=nolintlint ./... )
deploy_compile_parity_test.go:31:62: directive `//nolint:unparam // test helper returns (dir, cleanup); dir kept for symmetry` is unused for linter "unparam" (nolintlint)
plugin_cmd.go:25:40: directive `//nolint:unparam // Kong Run signature requires error; transport.Serve blocks until disconnect` is unused for linter "unparam" (nolintlint)
plugin_executor_reverse_test.go:71:35: directive `//nolint:staticcheck // grpc.Dial is fine for an in-memory bufconn test` is unused for linter "staticcheck" (nolintlint)
plugin_executor_reverse_test.go:113:35: same directive is unused for linter "staticcheck" (nolintlint)
plugin_loader.go:110:1: directive `//nolint:unparam // class is the provider-key dimension …` is unused for linter "unparam" (nolintlint)
plugin_transport.go:41:1: directive `//nolint:unparam // the (error) result is required by the PluginTransport interface …` is unused for linter "unparam" (nolintlint)
6 issues:
* nolintlint: 6

The module carries 18 //nolint directives; 6 are stale. The 12 live ones all
carry an explanation and a specific linter, so nolintlint at its defaults flags only
the unused six — enabling it does not churn the legitimate directives.

Root cause

The curated config enumerates the "broadest curated quality/idiom/duplication
linters" but omits the one linter whose job is suppression legitimacy. Without it, a
stale directive is invisible to CI forever (this is why the six above survived). Not a
missing capability in charly — a gap in the audit config itself.

Intended scope

  1. Add nolintlint to charly/.golangci.yml's linters.enable (defaults:
    allow-unused: false, require-specific: true, require-explanation: true — the
    existing 12 directives already satisfy specific+explanation).
  2. Remove the six stale directives (including the trailing empty doc-comment line
    where the removal leaves one, which would otherwise trip gofmt).
  3. Re-run ( cd charly && golangci-lint run ./... ) → 0 issues; go test/vet/gofmt.

charly/plugin_loader.go:110 overlaps workflow-ir's pipeline wave
(opencharly/charly, session 7e17b5cf), which independently removes the same
directive — one owner will take it; coordination in the PR.

Owning skill: /charly-internals:go-quality.

Related: opencharly/charly#767 (the curated config now runs in CI — this issue is the
"the curated set is incomplete" sibling).

Activity

  1. self-assigned this
    on Oct 3, 2026
  2. aitrawog commented on Oct 3, 2026

    @aitrawog
    ContributorAuthor

    CLAIM — filed from lint-canon while landing #767.

    The curated set now runs in CI (#767); this is its COMPLETENESS sibling: without nolintlint, a stale //nolint is invisible forever. 6 stale directives measured (one, plugin_loader.go:110, is also in workflow-ir's wave — coordinating a single owner so the gate is green).

    Plan: add nolintlint to charly/.golangci.yml, remove all 6 stale directives, re-run ( cd charly && golangci-lint run ./... ) → 0 issues + go test/vet/gofmt. It lands with the #767 lint-governance cutover (same theme, same config), unless the operator wants it split.

    Agent: lint-canon · session ses_eff40584bffe0JqilUWOh4UlTY
    Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

  3. aitrawog commented on Oct 3, 2026

    @aitrawog
    ContributorAuthor

    STATUS — folded into opencharly/charly#769 (the curated-config cutover); #769 will close this issue.

    Both are curated-config governance and the nolintlint enforcement requires #769's CI fix, so they are one cutover per the hard-cutover policy. #769 adds nolintlint to charly/.golangci.yml and removes the 6 stale directives this issue reports; its gate is green including nolintlint (0 issues). The plugin_loader.go:110 overlap with workflow-ir is resolved — #774 owns all 6 (including that one), coordinated on #769.

    Agent: lint-canon · session ses_eff40584bffe0JqilUWOh4UlTY
    Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)

  4. aitrawog commented on Oct 4, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED — landed in #769 (squash da779f20), tagged v2026.277.1722.

    nolintlint is enabled in charly/.golangci.yml (verified present on main), and the stale //nolint directives are removed. This PR removed 5 of the 6 the issue measured; the sixth, charly/plugin_loader.go:110, was independently removed on main by #778 before this branch merged main. The curated run (incl. nolintlint) is 0 issues on the final tree. Closing.

    Agent: lint-canon · session ses_eff40584bffe0JqilUWOh4UlTY
    Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions