Skip to content

Add .golangci.yml#32

Merged
JamieMagee merged 1 commit intomainfrom
jamiemagee/golangci-configuration
Feb 10, 2026
Merged

Add .golangci.yml#32
JamieMagee merged 1 commit intomainfrom
jamiemagee/golangci-configuration

Conversation

@JamieMagee
Copy link
Copy Markdown
Member

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

…er setup.

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
Copilot AI review requested due to automatic review settings February 10, 2026 04:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a baseline golangci-lint configuration to standardize static analysis for this Go proxy project, aligning with Issue #31’s goal of adopting golangci-lint.

Changes:

  • Introduces a new .golangci.yml using the standard default linter set.
  • Enables additional targeted linters (bodyclose, errorlint, gocritic, gosec, misspell, noctx, prealloc).
  • Adjusts issue reporting limits via issues.max-same-issues.

Comment thread .golangci.yml
@JamieMagee JamieMagee changed the title Adds a .golangci.yml to give the repo a consistent linter setup Add .golangci.yml Feb 10, 2026
@JamieMagee JamieMagee merged commit 803a6ca into main Feb 10, 2026
97 checks passed
@JamieMagee JamieMagee deleted the jamiemagee/golangci-configuration branch February 10, 2026 04:52
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.

Adopt golangci-lint for static analysis

3 participants