Skip to content

Fix today's new linting errors #12044

@rvagg

Description

@rvagg

We are using go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest in our CI so we get every new update and stuff breaks randomly. I'm of two minds with these things - I like that we don't have to remember to update the version, because we won't, but I don't like that we get random breakages.

I have a dirty branch at the moment I don't want to commit so am filling this as an issue for now. See https://github.com/filecoin-project/lotus/actions/runs/9248941331/job/25439975082

Comes from this being included in today's golangci-lint release: golangci/golangci-lint#4734

I think this is still a reasonable check, but also reasonable that we should _ = them if there's no existing way to return an error.

Error: chain/types/fil.go:71:13: Error return value of `fmt.Fprint` is not checked (errcheck)
		fmt.Fprint(s, f.String())
		          ^
Error: node/config/load.go:84:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
			fmt.Fprintf(
			           ^
Error: cli/client.go:1807:14: Error return value of `fmt.Fprintf` is not checked (errcheck)
		fmt.Fprintf(w, "Created\tDealCid\tDealId\tProvider\tState\tOn Chain?\tSlashed?\tPieceCID\tSize\tPrice\tDuration\tTransferChannelID\tTransferStatus\tVerified\tMessage\n")
		           ^
Error: cli/client.go:1835:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
			fmt.Fprintf(w, "%s\t%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%d\t%s\t%s\t%v\t%s\n",
			           ^
Error: cli/helper.go:79:12: Error return value of `fmt.Fprint` is not checked (errcheck)
	fmt.Fprint(a.app.Writer, args...)
	          ^
Error: cli/helper.go:83:14: Error return value of `fmt.Fprintln` is not checked (errcheck)
	fmt.Fprintln(a.app.Writer, args...)
	            ^
Error: cli/multisig.go:171:16: Error return value of `fmt.Fprintln` is not checked (errcheck)
			fmt.Fprintln(cctx.App.Writer, "actor creation failed!")
			            ^
Error: cli/multisig.go:181:15: Error return value of `fmt.Fprintln` is not checked (errcheck)
		fmt.Fprintln(cctx.App.Writer, "Created new multisig: ", execreturn.IDAddress, execreturn.RobustAddress)
		            ^
Error: cli/paych.go:180:14: Error return value of `fmt.Fprint` is not checked (errcheck)
			fmt.Fprint(writer, "Creating channel\n")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ☑️ Done (Archive)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions