Skip to content

Vet, lint and race-detect in CI - #81

Open
ApolloF wants to merge 2 commits into
mainfrom
ApolloF/a1-syncer-lint-ci
Open

ApolloF wants to merge 2 commits into
mainfrom
ApolloF/a1-syncer-lint-ci

Conversation

@ApolloF

@ApolloF ApolloF commented Nov 1, 2026

Copy link
Copy Markdown
Owner

CI only ran the tests and the build, so vet and lint findings and data races slipped through. The windows job now runs go vet, golangci-lint v2.15.0 (.golangci.yml: the standard set, errcheck off for now) and go test -race -short for both builds. The 19 findings of the first run are fixed, no race turned up. Nothing in the job needs a secret, so Dependabot PRs keep passing.

Follow-ups, not in this PR: errcheck (about 50 unchecked Close/Remove calls) and gosec at medium (38 findings, mostly G115 int conversions and G204 exec with a variable).

Standard linters (govet, ineffassign, staticcheck, unused) with all
staticcheck checks except ST1005 (error strings are shown to users as
sentences) and ST1022 (doc comments may read "Name, when set, ...").
errcheck stays off until its ~50 unchecked Close/Remove calls are fixed.

Findings fixed: eight De Morgan simplifications (QF1001), a package
comment for internal/app, the ModSpec/HoldNewMod doc comments untangled,
two dead helpers in internal/steam removed and a test helper moved to
the personal-build test file that uses it.
go vet and golangci-lint v2.15.0 for both builds, then go test -race
-short for both builds next to the full test runs. The windows job still
needs no secret, so Dependabot PRs keep passing; signing stays in the
tag-only release job. CONTRIBUTING.md lists the new tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant