From 3e0737a8bd11a63fe5b03990afc4965c7bcfe623 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 2 Feb 2025 22:45:06 +0100 Subject: [PATCH] sync golangci config with restic --- .golangci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 44dfcdc..b44c2c1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,13 +10,10 @@ linters: # make sure all errors returned by functions are handled - errcheck - # find unused code - - deadcode - # show how code can be simplified - gosimple - # # make sure code is formatted + # make sure code is formatted - gofmt # examine code and report suspicious constructs, such as Printf calls whose @@ -35,15 +32,14 @@ linters: # find unused variables, functions, structs, types, etc. - unused - # find unused struct fields - - structcheck - - # find unused global variables - - varcheck - # parse and typecheck code - typecheck + # ensure that http response bodies are closed + - bodyclose + + - importas + issues: # don't use the default exclude rules, this hides (among others) ignored # errors from Close() calls @@ -55,3 +51,6 @@ issues: - exported (function|method|var|type|const) .* should have comment or be unexported # revive: ignore constants in all caps - don't use ALL_CAPS in Go names; use CamelCase + # revive: lots of packages don't have such a comment + - "package-comments: should have a package comment" + - "redefines-builtin-id:"