Merge #152: Cirrus: Mark errcheck linter as mandatory

7f7467ae1f Log HTTP server errors (Jeremy Rand)
30b48de356 Explicitly suppress error returned by DomainValueHookTLS (Jeremy Rand)
04193f251e Explicitly suppress error returned by parseImport (Jeremy Rand)
d4e1513d3d Cirrus: Mark errcheck linter as mandatory (Jeremy Rand)

Pull request description:

  Also fix all warnings reported by that linter.

Top commit has no ACKs.

Tree-SHA512: cd4e507b70468d14f317e9a41404c2d267baf8ac75b851f305e558f3c03645aa50699311964fe39999bf923ebb511e0de4dcfd078d599f2e023900d5b47f8e2d
pull/157/head v0.3
Jeremy Rand 2 years ago
commit 4a96c3d4bb
No known key found for this signature in database
GPG Key ID: EB03139A459DD06E

@ -60,7 +60,7 @@ task:
- name: "Go Lint $GOOS Mandatory$MODULES_NAME" - name: "Go Lint $GOOS Mandatory$MODULES_NAME"
env: env:
# TODO: Re-enable varnamelen after golangci-lint v1.44 is released. # TODO: Re-enable varnamelen after golangci-lint v1.44 is released.
GOLANGCI_ARGS: "--disable=cyclop,deadcode,errcheck,errorlint,exhaustivestruct,forbidigo,forcetypeassert,funlen,gci,gocognit,gocritic,godot,godox,goerr113,gofumpt,goimports,golint,gosec,gosimple,govet,ineffassign,lll,maligned,nakedret,nestif,nilerr,nlreturn,paralleltest,revive,scopelint,staticcheck,stylecheck,thelper,unconvert,unparam,unused,varnamelen,wastedassign,whitespace,wrapcheck,wsl" GOLANGCI_ARGS: "--disable=cyclop,deadcode,errorlint,exhaustivestruct,forbidigo,forcetypeassert,funlen,gci,gocognit,gocritic,godot,godox,goerr113,gofumpt,goimports,golint,gosec,gosimple,govet,ineffassign,lll,maligned,nakedret,nestif,nilerr,nlreturn,paralleltest,revive,scopelint,staticcheck,stylecheck,thelper,unconvert,unparam,unused,varnamelen,wastedassign,whitespace,wrapcheck,wsl"
- name: "Go Lint $GOOS$MODULES_NAME" - name: "Go Lint $GOOS$MODULES_NAME"
env: env:
GOLANGCI_ARGS: "" GOLANGCI_ARGS: ""

@ -455,7 +455,7 @@ func (tx *btx) addAnswersUnderNCValueActual(ncv *ncdomain.Value, sn string) (rrs
// TODO: add callback variable "OnValueReferencedFunc" to backend options so that we don't pollute this function with every hook that we want // TODO: add callback variable "OnValueReferencedFunc" to backend options so that we don't pollute this function with every hook that we want
// might need to add the other attributes of tx, and sn, to the callback variable for flexibility's sake // might need to add the other attributes of tx, and sn, to the callback variable for flexibility's sake
// This doesn't normally return errors, but any errors during execution will be logged. // This doesn't normally return errors, but any errors during execution will be logged.
tlshook.DomainValueHookTLS(tx.qname, ncv) _ = tlshook.DomainValueHookTLS(tx.qname, ncv)
return return
} }

@ -399,7 +399,7 @@ func parse(rv interface{}, v *Value, resolve ResolveFunc, errFunc ErrorFunc, dep
return return
} }
parseImport(rvm, v, resolve, errFunc, depth, mergeDepth, relname, mergedNames) _ = parseImport(rvm, v, resolve, errFunc, depth, mergeDepth, relname, mergedNames)
if ip, ok := rvm["ip"]; ok { if ip, ok := rvm["ip"]; ok {
parseIP(rvm, v, errFunc, ip, false) parseIP(rvm, v, errFunc, ip, false)
} }

@ -214,7 +214,9 @@ func webStart(listenAddr string, server *Server) error {
Handler: ws, Handler: ws,
} }
go s.ListenAndServe() go func() {
// TODO: error handling err := s.ListenAndServe()
log.Errore(err, "HTTP server")
}()
return nil return nil
} }

Loading…
Cancel
Save