-
Notifications
You must be signed in to change notification settings - Fork 870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: lint issues #1487
fix: lint issues #1487
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1487 +/- ##
==========================================
+ Coverage 73.08% 73.13% +0.05%
==========================================
Files 268 268
Lines 18446 18415 -31
==========================================
- Hits 13481 13468 -13
+ Misses 4365 4350 -15
+ Partials 600 597 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff @GAtom22! I left a bunch of comments, but these are all concerned with 2 main things:
- I wouldn't use
nolint:all
except where it's necessary, and always indicate why the linter is escaped using the comments - Personally I would prefer if we follow a clear standard in the repo. I see that it makes sense for mocked functions to still have the unused parameters in the function signature to describe the expected interface. How about we do the following:
- In case of mocking, leave the unused parameters as is and comment with
//nolint:revive // allow unused parameters to indicate expected signature
- In case we're not mocking, replace unused parameters with
_
- All code, where we are sure that it can be removed without problems (e.g. testsuite setup), remove unused parameters from signature
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
… GAtom22/linting
recover, _ := cmd.Flags().GetBool(genutilcli.FlagRecover) | ||
if recover { | ||
|
||
recoverKey, _ := cmd.Flags().GetBool(genutilcli.FlagRecover) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack.
@@ -196,8 +196,8 @@ | |||
// Get bip39 mnemonic | |||
var mnemonic, bip39Passphrase string | |||
|
|||
recover, _ := cmd.Flags().GetBool(flagRecover) | |||
if recover { | |||
recoverKey, _ := cmd.Flags().GetBool(flagRecover) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack.
* fix: lint issues (#1487) * Bump Cosmos SDK dependency to v0.46.10-ledger.1 * Update changelog and upgrade handler versions * Add changelog entry --------- Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
Description
When updated the gh actions workflows to use go 1.20 on this PR, the golangci-lint was upgraded to v1.52.0. This upgrade brought up many lint issues that weren't considered before. This PR addresses those lint issues
Closes #XXX