all: enable and resolve uncheckedInlineErr, preferStringWriter, preferFprint, and deprecatedComment linter checks - #23097
Open
Sahil-4555 wants to merge 13 commits into
Open
Conversation
Sahil-4555
requested review from
AskAlexSharov,
anacrolix,
awskii,
domiwei,
lupin012,
mh0lt,
sudeepdino008,
taratorio and
yperbasis
as code owners
August 7, 2026 12:43
Contributor
|
[SharovBot] 🤖 Closed by automated review. This PR appears to be an AI-generated stylistic/convention change (linter compliance: These types of changes are not being accepted at this time. The changes will be included in a consolidated weekly cleanup PR. If you believe this was closed in error, please reach out to a maintainer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables four
gocriticlinter rules (uncheckedInlineErr,preferStringWriter,preferFprint, anddeprecatedComment) in.golangci.ymland resolves all code violations across the repository.uncheckedInlineErrerr := utils.SetNodeConfig(...)prior toif err != nilcheck incmd/erigon/node/node.go.preferStringWriterw.WriteString(s)overw.Write([]byte(s))to avoid unnecessary string-to-byte allocations on writers implementingio.StringWriter.Write([]byte(...))calls toWriteString(...)incmd/rpctest/rpctest/utils.goanddb/state/commitment_convert.go.preferFprintfmt.Fprintf(w, ...)overw.WriteString(fmt.Sprintf(...))for cleaner syntax and reduced allocations.fmt.Fprintfacrosscmd/capcli/cli.goandexecution/commitment/hex_patricia_hashed.go.deprecatedCommentDeprecated:notices by placing them in a dedicated paragraph so IDEs and Go tooling correctly parse deprecation hints.Deprecated:notices across:cl/cltypes/solid/hashutil.gonode/cli/flags.gop2p/enode/node.gorpc/jsonrpc/eth_deprecated.gorpc/subscription.go