-
Notifications
You must be signed in to change notification settings - Fork 579
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
fully enable revive #3888
fully enable revive #3888
Conversation
"Return in a defer function has no effect" |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3888 +/- ##
==========================================
- Coverage 79.49% 79.47% -0.03%
==========================================
Files 188 188
Lines 12987 12997 +10
==========================================
+ Hits 10324 10329 +5
- Misses 2234 2239 +5
Partials 429 429
|
modules/apps/27-interchain-accounts/controller/ibc_middleware.go
Outdated
Show resolved
Hide resolved
@crodriguezvega -- if you are reviewing, can you pull this branch, and then run: golangci-lint run ./... --fix ? I think this may have revealed an issue (the thing about return not doing anything inside defer) |
7bc91a7
to
693c247
Compare
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.
Made a couple of changes here, mostly to keep the diff localized and minimal.
- Disable
use-any
. I think this is fine tbh but I don't think there's much benefit in enforcing a single usage. We can revisit at a later point if required. - Renamed
s
tosuite
in the test files. - Reverted the renaming of vars I.e
_ -> someName
andsomeName -> _
. This usage was (and still is) inconsistent. A different issue should be opened to tackle this consistency nit.
Overall, LGTM, big thanks @faddat for the work on this and sorry for the slight delay in getting through with it (big diffs spook me).
Thank you @faddat and @DimitrisJim ❤️ |
oh amazing guys! I've been busy with family and thrilled to see this in <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.
linters-settings:
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- blank # blank imports
- dot # dot imports
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
- prefix(github.com/cometbft/cometbft)
- prefix(github.com/cosmos/ibc-go)
custom-order: true
dogsled:
max-blank-identifiers: 3
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
revive:
enable-all-rules: true
rules:
- name: if-return
disabled: true
- name: max-public-structs
disabled: true
- name: cognitive-complexity
disabled: true
- name: argument-limit
disabled: true
- name: cyclomatic
disabled: true
- name: file-header
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
disabled: true
- name: line-length-limit
disabled: true
- name: flag-parameter
disabled: true
- name: add-constant
disabled: true
- name: empty-lines
disabled: true
- name: banned-characters
disabled: true
- name: deep-exit
disabled: true
- name: unused-parameter
disabled: true
- name: modifies-value-receiver
disabled: true
- name: early-return
disabled: true
- name: confusing-naming
disabled: true
- name: defer
disabled: true
- name: unhandled-error
disabled: false
arguments:
- 'fmt.Printf'
- 'fmt.Print'
- 'fmt.Println'
- 'myFunction'
This PR fully enables the revive linter.
So far it has been removing import shadwing
caused by the use of the word suite as a
method reciever instead of the letter s.
Summary of changes