Skip to content
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

Merged
merged 106 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
4348ae3
fully enable revive
faddat Jun 18, 2023
4c47064
revive
faddat Jun 18, 2023
9620af9
resolve import shadowing by use of suite as a reciever
faddat Jun 18, 2023
e86e3c9
unused-receiver
faddat Jun 18, 2023
11225aa
names in parse.go
faddat Jun 19, 2023
ec8f0e4
resolve import shadowing
faddat Jun 19, 2023
dacd924
resolve import shadowing in all places
faddat Jun 19, 2023
a3c75bb
disable flag-return revive linter
faddat Jun 19, 2023
26387a1
remove all unused receivers
faddat Jun 19, 2023
5e0a496
disable modifies-method-receiver
faddat Jun 19, 2023
43423fd
unused-rec
faddat Jun 19, 2023
92f0227
unused-rec
faddat Jun 19, 2023
0d7037c
unused-rec
faddat Jun 19, 2023
55e6862
unused-parameter
faddat Jun 19, 2023
f3f5acf
unused
faddat Jun 19, 2023
04e6124
Merge branch 'main' into fully-revived
faddat Jun 19, 2023
e1f2e8c
remove unused-parameter linter
faddat Jun 19, 2023
016146a
Merge branch 'fully-revived' of https://github.com/faddat/ibc-go into…
faddat Jun 19, 2023
4648bbd
Revert "unused-parameter"
faddat Jun 21, 2023
4aebb69
Revert "unused"
faddat Jun 21, 2023
07abc21
revert a spelling issue caused by using us locale
faddat Jun 21, 2023
f7f5ee2
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jun 21, 2023
c5086c1
don't use unused-parameters
faddat Jun 21, 2023
834eb78
don't use unused-parameters
faddat Jun 21, 2023
f42f338
Merge branch 'main' into fully-revived
faddat Jun 22, 2023
0a00cf9
fix a few stragglers and focus in on "return in a defer function"
faddat Jun 22, 2023
04d109b
interfaces -> any. Disable early-return and defer in revive for now.
faddat Jun 22, 2023
766ea9c
transfer ibc module
faddat Jun 22, 2023
60d2669
type params
faddat Jun 22, 2023
13cd20f
revert unneeded changes
faddat Jun 22, 2023
e562e59
revert unneeded changes
faddat Jun 22, 2023
3c3f8fa
Revert "lint docs same as docs-lint pr"
faddat Jun 23, 2023
72a6572
Merge branch 'main' into fully-revived
faddat Jun 23, 2023
83b2dbc
fix unused parameters (cleanup)
faddat Jun 23, 2023
a6e84c7
restore export.go
faddat Jun 23, 2023
0c7cf79
restore mock.go
faddat Jun 23, 2023
d8a63e3
resolve linting issues in mock.go
faddat Jun 23, 2023
c49e80b
move interchain accounts tests to ica
faddat Jun 23, 2023
b0259f9
complete cleanup
faddat Jun 23, 2023
da15c0d
cleanup parameters
faddat Jun 23, 2023
bd7f42b
cleanup parameters
faddat Jun 23, 2023
d256f87
Merge branch 'main' into fully-revived
faddat Jun 27, 2023
02740ef
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jun 28, 2023
69ede09
suite -> s
faddat Jun 28, 2023
294581d
Merge branch 'main' into fully-revived
faddat Jun 28, 2023
dffc514
Merge branch 'main' into fully-revived
faddat Jun 29, 2023
b8cb8b6
Merge branch 'main' into fully-revived
faddat Jul 2, 2023
d0ed64c
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jul 3, 2023
bee9fb6
Merge branch 'main' into fully-revived
faddat Jul 3, 2023
3d29c0e
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jul 4, 2023
3ad8e1e
Merge branch 'main' into fully-revived
faddat Jul 5, 2023
9a32c4d
further cleanup
faddat Jul 5, 2023
bcbcad2
fully cleaned
faddat Jul 5, 2023
101bd0d
Merge branch 'main' into fully-revived
faddat Jul 5, 2023
8ccbb23
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jul 10, 2023
2266c02
tidy capability
faddat Jul 10, 2023
3f31f98
Merge branch 'main' into fully-revived
faddat Jul 11, 2023
03d1c0d
Merge commit '4bb1b5101da975bb5e990742dd008357d64f4ed8' into fully-re…
faddat Jul 15, 2023
65cab9c
Merge commit '9f11ea17f971d362c6b57a3f391bc844314fe5fd' into fully-re…
faddat Jul 15, 2023
c559f03
Merge commit 'e112168c34a2fca778ff3e5581a31718488f8bb2' into fully-re…
faddat Jul 15, 2023
8572d55
Merge commit '7ee9a3186dd2bd717efaee60cae95329f53bbd99' into fully-re…
faddat Jul 15, 2023
fd761de
Update e2e/testvalues/values.go
faddat Jul 16, 2023
8a5b1a8
make e2e match main
faddat Jul 16, 2023
5d08e25
make .github match main
faddat Jul 16, 2023
bf680b4
Update modules/core/02-client/migrations/v7/solomachine.go
faddat Jul 16, 2023
a5fc2ae
Merge commit 'd29fa62fdc2e48b9ea274f6652474d28d426a72e' into fully-re…
faddat Jul 16, 2023
660b249
Merge branch 'fully-revived' of https://github.com/faddat/ibc-go into…
faddat Jul 16, 2023
d91f61a
make the e2e folder match main
faddat Jul 16, 2023
1a41905
remove the test instances accidentally added
faddat Jul 16, 2023
ee53b6c
Merge branch 'main' into fully-revived
faddat Jul 19, 2023
5e11175
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jul 22, 2023
e190f2d
name unused parameters
faddat Jul 22, 2023
3982cbe
don't name something "prefix" when using an import named "prefix"
faddat Jul 22, 2023
0cb453b
use string, string instead of named returns, but keep the naming clarity
faddat Jul 22, 2023
d0c6eb7
finish consistency
faddat Jul 22, 2023
eba6b0d
Merge branch 'main' into fully-revived
faddat Jul 24, 2023
134364e
Merge remote-tracking branch 'origin/main' into fully-revived
faddat Jul 25, 2023
9688347
import suite as testifysuite
faddat Jul 25, 2023
d1f34b1
Rename suite to testifysuite, fix references.
DimitrisJim Jul 27, 2023
d67d25a
s -> suite for controller module.
DimitrisJim Jul 27, 2023
a5b4f39
s -> suite for host module.
DimitrisJim Jul 27, 2023
e971baf
s -> suite for fee module, clean up additional host references.
DimitrisJim Jul 27, 2023
fc04cd2
s -> suite for transfer.
DimitrisJim Jul 27, 2023
aa14a11
s -> suite for capability.
DimitrisJim Jul 27, 2023
b277f99
s -> suite for 02-client.
DimitrisJim Jul 27, 2023
10575fd
s -> suite for 03-connection.
DimitrisJim Jul 27, 2023
059f53e
s -> suite, missed cases.
DimitrisJim Jul 27, 2023
1758c3c
s -> suite, 04-channel.
DimitrisJim Jul 27, 2023
45b9f70
s -> suite, 05-port.
DimitrisJim Jul 27, 2023
bce324a
s -> suite, 23-commitment.
DimitrisJim Jul 27, 2023
b78b4d6
s -> suite, core.
DimitrisJim Jul 27, 2023
e7d16a8
s -> suite, light-client solomachine
DimitrisJim Jul 27, 2023
7b195e1
s -> suite, light-client tendermint
DimitrisJim Jul 27, 2023
818728c
s -> suite, light-client localhost
DimitrisJim Jul 27, 2023
f5e140f
s -> suite, testing folder
DimitrisJim Jul 27, 2023
693c247
clean up remaining usages of s.
DimitrisJim Jul 27, 2023
88e9f87
Merge branch 'main' into fully-revived
DimitrisJim Jul 28, 2023
7027e62
Add directives to ignore deprecated event attributes.
DimitrisJim Jul 28, 2023
eecc58f
Allow usage of interface{}.
DimitrisJim Jul 31, 2023
d496b6e
Merge branch 'main' into fully-revived
DimitrisJim Jul 31, 2023
8c4f7d4
Fix linting issues after rebase.
DimitrisJim Jul 31, 2023
02537f1
Merge branch 'main' into fully-revived
DimitrisJim Jul 31, 2023
f9600f7
Merge branch 'main' into fully-revived
DimitrisJim Jul 31, 2023
240a386
Address new linting issues.
DimitrisJim Jul 31, 2023
f7adca4
Revert renaming of args. Requires separate issue.
DimitrisJim Aug 1, 2023
f85eb24
Merge branch 'main' into fully-revived
chatton Aug 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 48 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,24 @@ linters:
- nakedret
- staticcheck
- thelper
- typecheck
- stylecheck
- revive
- typecheck
- tenv
- unconvert
- unused
- misspell

issues:
exclude-rules:
- text: 'unused-parameter'
- text: 'differs only by capitalization to method'
linters:
- revive
- text: 'SA1019:'
linters:
- staticcheck
- text: 'Use of weak random number generator'
linters:
- gosec
- text: 'ST1003:'
linters:
- stylecheck
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- text: 'ST1016:'
linters:
- stylecheck

max-issues-per-linter: 10000
max-same-issues: 10000

Expand All @@ -73,6 +65,50 @@ linters-settings:
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'
6 changes: 3 additions & 3 deletions cmd/build_test_matrix/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ func TestGetGithubActionMatrixForTests(t *testing.T) {

fileWithTwoSuites := `package foo
func SuiteOne(t *testing.T) {
suite.Run(t, new(FeeMiddlewareTestSuite))
s.Run(t, new(FeeMiddlewareTestSuite))
}

func SuiteTwo(t *testing.T) {
suite.Run(t, new(FeeMiddlewareTestSuite))
s.Run(t, new(FeeMiddlewareTestSuite))
}

type FeeMiddlewareTestSuite struct {}
Expand Down Expand Up @@ -166,7 +166,7 @@ func goTestFileContents(suiteName, fnName1, fnName2 string) string {
replacedSuiteName := strings.ReplaceAll(`package foo

func TestSuiteName(t *testing.T) {
suite.Run(t, new(SuiteName))
s.Run(t, new(SuiteName))
}

type SuiteName struct {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ appropriate relative timeoutTimestamp must be provided with flag {relative-packe
var icaMsgData icatypes.InterchainAccountPacketData
msgContentOrFileName := args[1]
if err := cdc.UnmarshalJSON([]byte(msgContentOrFileName), &icaMsgData); err != nil {

// check for file path if JSON input is not provided
contents, err := os.ReadFile(msgContentOrFileName)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (im IBCMiddleware) OnChanOpenInit(
}

// OnChanOpenTry implements the IBCMiddleware interface
func (im IBCMiddleware) OnChanOpenTry(
func (IBCMiddleware) OnChanOpenTry(
ctx sdk.Context,
order channeltypes.Order,
connectionHops []string,
Expand Down Expand Up @@ -124,7 +124,7 @@ func (im IBCMiddleware) OnChanOpenAck(
}

// OnChanOpenConfirm implements the IBCMiddleware interface
func (im IBCMiddleware) OnChanOpenConfirm(
func (IBCMiddleware) OnChanOpenConfirm(
ctx sdk.Context,
portID,
channelID string,
Expand All @@ -133,7 +133,7 @@ func (im IBCMiddleware) OnChanOpenConfirm(
}

// OnChanCloseInit implements the IBCMiddleware interface
func (im IBCMiddleware) OnChanCloseInit(
func (IBCMiddleware) OnChanCloseInit(
ctx sdk.Context,
portID,
channelID string,
Expand Down Expand Up @@ -165,10 +165,10 @@ func (im IBCMiddleware) OnChanCloseConfirm(
}

// OnRecvPacket implements the IBCMiddleware interface
func (im IBCMiddleware) OnRecvPacket(
func (IBCMiddleware) OnRecvPacket(
ctx sdk.Context,
packet channeltypes.Packet,
_ sdk.AccAddress,
address sdk.AccAddress,
) ibcexported.Acknowledgement {
err := errorsmod.Wrapf(icatypes.ErrInvalidChannelFlow, "cannot receive packet on controller chain")
ack := channeltypes.NewErrorAcknowledgement(err)
Expand Down Expand Up @@ -227,7 +227,7 @@ func (im IBCMiddleware) OnTimeoutPacket(
}

// SendPacket implements the ICS4 Wrapper interface
func (im IBCMiddleware) SendPacket(
func (IBCMiddleware) SendPacket(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
sourcePort string,
Expand All @@ -240,7 +240,7 @@ func (im IBCMiddleware) SendPacket(
}

// WriteAcknowledgement implements the ICS4 Wrapper interface
func (im IBCMiddleware) WriteAcknowledgement(
func (IBCMiddleware) WriteAcknowledgement(
ctx sdk.Context,
chanCap *capabilitytypes.Capability,
packet ibcexported.PacketI,
Expand Down
Loading
Loading