Skip to content

Conversation

@wolf31o2
Copy link
Contributor

Summary

Prevent golangci-lint from detecting missing error handing on defer calls to close the incoming request body.

Type of Change

Please mark the relevant option(s) for your pull request:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)
  • Build update

Checklist

Please ensure that your pull request meets the following criteria:

  • I have read the Contributing Guide
  • My code follows the project's coding style and best practices
  • My code is appropriately commented and includes relevant documentation
  • I have added tests to cover my changes
  • All new and existing tests pass
  • I have updated the documentation, if necessary

Prevent golangci-lint from detecting missing error handing on defer
calls to close the incoming request body.

Signed-off-by: Chris Gianelloni <[email protected]>
@wolf31o2 wolf31o2 requested a review from a team as a code owner May 27, 2025 20:40
@Vardominator Vardominator requested a review from Copilot May 29, 2025 00:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the code to suppress golangci-lint warnings regarding unchecked errors on defer calls by appending “//nolint:errcheck” to each deferred resp.Body.Close() call.

  • Suppresses lint warnings by adding "//nolint:errcheck" after defer statements
  • Updates multiple client files to uniformly apply this change

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/txmanager.go Added nolint directive to defer call in TxManagerHistory, TxManagerSubmit, TxManagerSubmitTurbo, and TxManagerState functions
client/transactions.go Added nolint directive to defer call in various transaction-related functions
client/scripts.go Added nolint directive to defer call in ScriptByHash function
client/pools.go Added nolint directive to defer calls in functions handling pool data
client/linear_vesting.go Added nolint directive to defer calls in LockAssets, StateOfVestingAssets, and CollectAssets functions
client/general.go Added nolint directive in ChainTip, EraSummaries, ProtocolParameters, and BlockChainStartTime functions
client/epochs.go Added nolint directive in CurrentEpoch and SpecificEpoch functions
client/ecosystem.go Added nolint directive in ResolveAdaHandle function
client/datum.go Added nolint directive in DatumFromHash function
client/client.go Added nolint directive in sendRequest function
client/asset_policy.go Added nolint directive in all policy-related functions
client/asset.go Added nolint directive in asset-related functions
client/addresses.go Added nolint directive in various address functions including decoding and transactions
client/accounts.go Added nolint directive in account-related functions

@Vardominator Vardominator merged commit 74fe569 into maestro-org:main May 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants