Merge namecoin/ncdns#158: Disable some unwanted Cirrus checks

37d7d99c50 Make "Modules Off" tasks non-mandatory until btcd is upgraded (Jeremy Rand)
9c7589d64f Suppress errchkjson false positive (Jeremy Rand)
7e46b7d256 Disable execinquery linter (Jeremy Rand)
1696838438 Mark nonamedreturns linter as non-mandatory (Jeremy Rand)
2c54918935 Disable exhaustruct linter (Jeremy Rand)

Pull request description:

Top commit has no ACKs.

Tree-SHA512: b6435bd770864f2db51ca6ca391d327b2bfa12cf632bc61efa80fda8dfa78c8fd2e9ecdbc8357ac05a77e542b7a6c7fa3a229b318da6e24d4bf41173f0dcc543
pull/159/head
Jeremy Rand 2 years ago
commit bed8c7d921
No known key found for this signature in database
GPG Key ID: EB03139A459DD06E

@ -16,6 +16,8 @@ task:
GO111MODULE: "off"
GOLANGCI_MODULES_ARGS: "--disable=gomoddirectives,gomodguard"
MODULES_NAME: " Modules Off"
# TODO: Stop allowing failures once btcd v0.22.1 is released.
allow_failures: true
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
@ -52,7 +54,7 @@ task:
- go mod tidy
lint_script:
- cd $(go env GOPATH)/src/github.com/$CIRRUS_REPO_FULL_NAME/
- golangci-lint run --enable-all --disable gochecknoglobals,gomnd,interfacer $GOLANGCI_ARGS $GOLANGCI_MODULES_ARGS -v --timeout 5m --out-format json > $CIRRUS_WORKING_DIR/lint-report.json
- golangci-lint run --enable-all --disable execinquery,exhaustruct,gochecknoglobals,gomnd,interfacer $GOLANGCI_ARGS $GOLANGCI_MODULES_ARGS -v --timeout 5m --out-format json > $CIRRUS_WORKING_DIR/lint-report.json
matrix:
- name: "Go Lint $GOOS New$MODULES_NAME"
env:
@ -60,7 +62,7 @@ task:
- name: "Go Lint $GOOS Mandatory$MODULES_NAME"
env:
# TODO: Re-enable varnamelen after golangci-lint v1.44 is released.
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"
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,nonamedreturns,paralleltest,revive,scopelint,staticcheck,stylecheck,thelper,unconvert,unparam,unused,varnamelen,wastedassign,whitespace,wrapcheck,wsl"
- name: "Go Lint $GOOS$MODULES_NAME"
env:
GOLANGCI_ARGS: ""
@ -109,6 +111,8 @@ task:
- env:
GO111MODULE: "off"
MODULES_NAME: " Modules Off"
# TODO: Stop allowing failures once btcd v0.22.1 is released.
allow_failures: true
fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
@ -175,6 +179,8 @@ task:
- env:
GO111MODULE: "off"
MODULES_NAME: " Modules Off"
# TODO: Stop allowing failures once btcd v0.22.1 is released.
allow_failures: true
gox_script:
- go get github.com/mitchellh/gox
fetch_script:

@ -79,7 +79,9 @@ func (dehydrated *DehydratedCertificate) SerialNumber(name string) ([]byte, erro
func (dehydrated *DehydratedCertificate) String() string {
output := []interface{}{1, dehydrated.PubkeyB64, dehydrated.NotBeforeScaled, dehydrated.NotAfterScaled, dehydrated.SignatureAlgorithm, dehydrated.SignatureB64}
binOutput, _ := json.Marshal(output)
// We don't need to check for errors, because json.Marshal is guaranteed to
// succeed for integer/string types.
binOutput, _ := json.Marshal(output) //nolint:errchkjson
return string(binOutput)
}

Loading…
Cancel
Save