Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 12 additions & 5 deletions .github/workflows/async-icq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- ".github/workflows/async-icq.yml"

env:
LINT_VERSION: v1.55.2
GO_VERSION: 1.22.1
LINT_VERSION: v2.12.2
GO_VERSION: 1.25.9
WORKING_DIRECTORY: modules/async-icq

HOST_TAR_PATH: /tmp/icq-host.tar
Expand All @@ -23,14 +23,21 @@ jobs:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v9.2.1
with:
version: ${{ env.LINT_VERSION }}
only-new-issues: true
args: --timeout=10m
working-directory: ${{ env.WORKING_DIRECTORY }}
args: --timeout=5m

test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ibc-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- ".github/workflows/ibc-hooks.yml"

env:
LINT_VERSION: v2.11.3
LINT_VERSION: v2.12.2
GO_VERSION: 1.25.9
WORKING_DIRECTORY: modules/ibc-hooks

Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/packet-forward-middleware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- ".github/workflows/packet-forward-middleware.yml"

env:
LINT_VERSION: v1.57.1
GO_VERSION: 1.22.1
LINT_VERSION: v2.12.2
GO_VERSION: 1.25.9
WORKING_DIRECTORY: middleware/packet-forward-middleware

DOCKER_TAG: pfm:local
Expand All @@ -19,14 +19,21 @@ jobs:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v6
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9.2.1
with:
version: ${{ env.LINT_VERSION }}
only-new-issues: true
args: --timeout=10m
working-directory: ${{ env.WORKING_DIRECTORY }}
args: --timeout=5m

test:
runs-on: ubuntu-latest
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/rate-limiting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- ".github/workflows/rate-limiting.yml"

env:
LINT_VERSION: v1.57.1
GO_VERSION: 1.22.1
LINT_VERSION: v2.12.2
GO_VERSION: 1.25.9
WORKING_DIRECTORY: modules/rate-limiting

DOCKER_TAG: rate-limiting:local
Expand All @@ -19,25 +19,21 @@ jobs:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/setup-go@v6
with:
go-version: "1.23"
check-latest: true
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: golangci-lint
uses: golangci/golangci-lint-action@v9.2.1
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
- name: run linting
if: env.GIT_DIFF
run: |
cd ${{ env.WORKING_DIRECTORY }}
make lint
version: ${{ env.LINT_VERSION }}
only-new-issues: true
args: --timeout=10m
working-directory: ${{ env.WORKING_DIRECTORY }}

test:
runs-on: ubuntu-latest
Expand Down
133 changes: 75 additions & 58 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,95 @@
version: "2"
run:
tests: true
# # timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m

linters:
disable-all: true
default: none
enable:
- copyloopvar
- dogsled
- exportloopref
- errcheck
- gci
- goconst
- gocritic
- gofumpt
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- revive
- staticcheck
- thelper
- stylecheck
- revive
- typecheck
- unconvert
- unused
- misspell

settings:
dogsled:
max-blank-identifiers: 3
gosec:
excludes:
- G107
- G115
- G404
nolintlint:
require-explanation: false
require-specific: false
allow-unused: false
revive:
rules:
- name: if-return
disabled: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- revive
text: unused-parameter
# Repeated literals in table-driven tests are fixtures, not constants.
- linters:
- goconst
path: _test\.go
- linters:
- staticcheck
text: 'SA1019:'
- linters:
- gosec
text: Use of weak random number generator
- linters:
- staticcheck
text: 'ST1003:'
# FIXME: Disabled until golangci-lint updates staticcheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- linters:
- staticcheck
text: 'ST1016:'
paths:
- third_party$
- builtin$
- examples$
issues:
exclude-rules:
- text: 'unused-parameter'
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

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:
rules:
- name: if-return
disabled: true
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- blank
- dot
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
- prefix(github.com/cometbft/cometbft)
- prefix(github.com/cosmos/ibc-go)
custom-order: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
4 changes: 2 additions & 2 deletions cosmwasm/polytone/tests/simtests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ go 1.19

require (
github.com/CosmWasm/wasmd v0.31.0
github.com/CosmWasm/wasmvm v1.2.1
github.com/cosmos/cosmos-sdk v0.45.14
github.com/cosmos/gogoproto v1.4.6
github.com/cosmos/ibc-go/v4 v4.3.0
github.com/stretchr/testify v1.8.2
)
Expand All @@ -17,7 +19,6 @@ require (
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/CosmWasm/wasmvm v1.2.1 // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect
Expand All @@ -38,7 +39,6 @@ require (
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogoproto v1.4.6 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/cosmos/iavl v0.19.5 // indirect
github.com/cosmos/interchain-accounts v0.2.6 // indirect
Expand Down
6 changes: 0 additions & 6 deletions cosmwasm/polytone/tests/simtests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@ github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EF
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo=
github.com/CosmWasm/wasmd v0.31.0-rc1 h1:2n0U/9ETZPRP2FSENjK4VTguP2ubW184mHyIZ/UH5XM=
github.com/CosmWasm/wasmd v0.31.0-rc1/go.mod h1:1KrKbYfCgylXobaJ92b03zBHpjnl22+Lv75e1EbSG9o=
github.com/CosmWasm/wasmd v0.31.0 h1:xACf6A/SkCeGWQWrKGsR4X9PQb5G4XYuNfnrl+HQ1mE=
github.com/CosmWasm/wasmd v0.31.0/go.mod h1:VcyDGk/ISVlMUeW+1GGL0zdHWBS2FPwLEV2qZ86l7l8=
github.com/CosmWasm/wasmvm v1.2.0 h1:pNCp175id+r/dSa4Ii5zoTkmauOoeipkvepvEJM1bao=
github.com/CosmWasm/wasmvm v1.2.0/go.mod h1:OIhXFPi9BbcEL1USBj4OIrBTtSSds+9eEql56fsdyfE=
github.com/CosmWasm/wasmvm v1.2.1 h1:si0tRsRDdUShV0k51Wn6zRKlmj3/WWP9Yr4cLmDTf+8=
github.com/CosmWasm/wasmvm v1.2.1/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
Expand Down Expand Up @@ -1376,8 +1372,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/polytone/tests/strangelove/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.19
require (
github.com/CosmWasm/wasmvm v1.2.1
github.com/strangelove-ventures/interchaintest/v4 v4.0.0-20230301185707-668fe0ea8377
github.com/stretchr/testify v1.8.2
go.uber.org/zap v1.23.0
)

Expand Down Expand Up @@ -137,7 +138,6 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.14.0 // indirect
github.com/stretchr/testify v1.8.2 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion middleware/packet-forward-middleware/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build . -t pfm:local
# docker run --rm -it pfm:local q ibc-router

FROM golang:1.23-alpine3.21 AS builder
FROM golang:1.26-alpine AS builder

RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make;

Expand Down
8 changes: 4 additions & 4 deletions middleware/packet-forward-middleware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ mocks: $(MOCKS_DIR)
mockgen -package=mock -destination=./test/mock/transfer_keeper.go $(GOMOD)/packetforward/types TransferKeeper
mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/packetforward/types BankKeeper
mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/packetforward/types ChannelKeeper
mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v10/modules/core/05-port/types ICS4Wrapper
mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v10/modules/core/05-port/types IBCModule
mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v11/modules/core/05-port/types ICS4Wrapper
mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v11/modules/core/05-port/types PacketUnmarshalerModule

.PHONY: mocks

Expand Down Expand Up @@ -234,10 +234,10 @@ ictest-upgrade:
###############################################################################

lint:
golangci-lint run --out-format=tab
golangci-lint run

lint-fix:
golangci-lint run --fix --out-format=tab --issues-exit-code=0
golangci-lint run --fix --issues-exit-code=0
.PHONY: lint lint-fix

format:
Expand Down
7 changes: 4 additions & 3 deletions middleware/packet-forward-middleware/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ require (
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/bits-and-blooms/bitset v1.22.0 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/bytedance/sonic v1.14.0 // indirect
github.com/bytedance/sonic/loader v0.3.0 // indirect
github.com/bytedance/gopkg v0.1.3 // indirect
github.com/bytedance/sonic v1.15.2 // indirect
github.com/bytedance/sonic/loader v0.5.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cloudwego/base64x v0.1.5 // indirect
github.com/cloudwego/base64x v0.1.6 // indirect
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
github.com/cockroachdb/errors v1.12.0 // indirect
github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect
Expand Down
Loading
Loading