Skip to content

chore: fix lint errors from newer golangci-lint - #7958

Merged
steadytao merged 1 commit into
caddyserver:masterfrom
faiyazrahmann:fix-lint-drift
Aug 25, 2026
Merged

steadytao merged 1 commit into
caddyserver:masterfrom
faiyazrahmann:fix-lint-drift

Conversation

@faiyazrahmann

Copy link
Copy Markdown
Contributor

CI lint is red on master, but it looks like it’s not caused by a code change. The workflow uses version: latest, and golangci-lint v2.13.0 landed with updates to two bundled linters.

gofumpt v0.9.2 → v0.11.0

  • caddytls: (FileLoader)(nil) → FileLoader(nil), same for FolderLoader and PEMLoader
  • fileserver/matcher.go: if !(...) → if !...

staticcheck v0.7.0 → v0.8.0

  • caddytest.go: removed DualStack: true, which has been inert since Go 1.12

One slightly confusing thing: CI reports 4 errors, but there are actually 5. max-same-issues is set to 3, so one of the gofumpt errors gets hidden because they have the same message. The hidden one is matcher.go, so fixing only caddytls still leaves CI red. --max-same-issues=0 shows all 5.

I verified this with golangci-lint v2.13.1 (current latest) and it’s clean now. Build, vet, and tests also pass for the touched packages.

This was what was blocking CI on #7946.

cc @steadytao

AI disclosure: I used AI to help figure out which files CI was complaining about and why.

Signed-off-by: Faiyaz Rahman <faiyazrahman03@gmail.com>
Copilot AI lite review requested due to automatic review settings August 24, 2026 18:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@steadytao steadytao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@steadytao
steadytao merged commit 4974956 into caddyserver:master Aug 25, 2026
24 checks passed
@steadytao steadytao added this to the v2.11.5 milestone Aug 25, 2026
@faiyazrahmann
faiyazrahmann deleted the fix-lint-drift branch August 25, 2026 14:28
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.

3 participants