From ed19c8ff05b5574482199770cc413177422e3fae Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Mon, 9 Feb 2026 20:15:44 -0800 Subject: [PATCH] Adds a `.golangci.yml` (v2 format) to give the repo a consistent linter setup. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The config uses the `standard` default set (`errcheck`, `govet`, `ineffassign`, `staticcheck`, `unused`) and turns on a few extras that catch real bugs without being too noisy: - `bodyclose` — unclosed HTTP response bodies - `errorlint` — incorrect error wrapping - `gocritic` — common code style issues - `gosec` — security problems - `misspell` — typos - `noctx` — missing context in HTTP/net calls - `prealloc` — slice preallocation hints There are existing findings (mostly `errcheck`). Fixing those and wiring this into CI are separate follow-ups. Closes #31 --- .golangci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .golangci.yml diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..f0888a9 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,15 @@ +version: "2" + +linters: + default: standard + enable: + - bodyclose + - errorlint + - gocritic + - gosec + - misspell + - noctx + - prealloc + +issues: + max-same-issues: 0