Skip to content
Open
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
8 changes: 2 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:
binaries: |
- /go/bin/layerd
heighliner-tag: v1.7.5
additional-args: |
--go-version 1.24.13 --alpine-version 3.22

- name: Publish Primary Tarball as Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -72,8 +70,6 @@ jobs:
binaries: |
- /go/bin/layerd
heighliner-tag: v1.7.5
additional-args: |
--go-version 1.24.13 --alpine-version 3.22

- name: Publish IBC Tarball as Artifact
uses: actions/upload-artifact@v4
Expand All @@ -97,7 +93,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25'

- name: Generate Matrix
id: set-matrix
Expand Down Expand Up @@ -129,7 +125,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25'

- name: Download Primary Tarball
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
run: go clean -modcache

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25'

- name: Build
run: go build -v ./...
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
go-version: "1.25"
check-latest: true
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
Expand Down
283 changes: 150 additions & 133 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,158 +1,175 @@
version: "2"
run:
build-tags:
- e2e
- ledger
- test_ledger_mock
tests: true
timeout: 15m
sort-results: true
allow-parallel-runners: true
exclude-dir: testutil/testdata


build-tags:
- e2e
- ledger
- test_ledger_mock


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

issues:
exclude-files:
settings:
dogsled:
max-blank-identifiers: 8
gocritic:
disabled-checks:
- regexpMust
- appendAssign
- ifElseChain
gosec:
includes:
- G102
- G103
- G104
- G106
- G107
- G108
- G109
- G110
- G111
- G112
- G113
- G114
- G201
- G202
- G203
- G204
- G301
- G302
- G303
- G304
- G305
- G306
- G307
- G401
- G402
- G403
- G404
- G501
- G502
- G503
- G504
- G505
- G601
misspell:
locale: US
nolintlint:
require-explanation: true
require-specific: false
allow-unused: false
revive:
rules:
- name: redefines-builtin-id
disabled: true
staticcheck:
checks:
- all
- -QF1001
- -QF1002
- -QF1003
- -QF1004
- -QF1005
- -QF1006
- -QF1007
- -QF1008
- -QF1009
- -QF1010
- -QF1011
- -QF1012
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gosec
text: Use of weak random number generator
- linters:
- staticcheck
text: 'ST1003:'
- linters:
- staticcheck
text: 'ST1016:'
- linters:
- staticcheck
path: migrations
text: 'SA1019:'
- linters:
- staticcheck
text: 'SA1019: codec.NewAminoCodec is deprecated'
- linters:
- staticcheck
text: 'SA1019: legacybech32.MustMarshalPubKey'
- linters:
- staticcheck
text: 'SA1019: legacybech32.MarshalPubKey'
- linters:
- staticcheck
text: 'SA1019: legacybech32.UnmarshalPubKey'
- linters:
- staticcheck
text: 'SA1019: params.SendEnabled is deprecated'
- linters:
- nolintlint
text: leading space
paths:
- server/grpc/gogoreflection/fix_registration.go
- "fix_registration.go"
- ".*\\.pb\\.go$"
- ".*\\.pb\\.gw\\.go$"
- ".*\\.pulsar\\.go$"
- fix_registration.go
- .*\.pb\.go$
- .*\.pb\.gw\.go$
- .*\.pulsar\.go$
- crypto/keys/secp256k1/internal/*
# - types/coin_regex.go
exclude-rules:
- 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
- path: "migrations"
text: "SA1019:"
linters:
- staticcheck
- text: "SA1019: codec.NewAminoCodec is deprecated" # TODO remove once migration path is set out
linters:
- staticcheck
- text: "SA1019: legacybech32.MustMarshalPubKey" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1019: legacybech32.MarshalPubKey" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1019: legacybech32.UnmarshalPubKey" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1019: params.SendEnabled is deprecated" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "leading space"
linters:
- nolintlint
- testutil/testdata
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 10000
max-same-issues: 10000

linters-settings:
gci:
custom-order: true
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
revive:
rules:
- name: redefines-builtin-id
disabled: true

gosec:
# To select a subset of rules to run.
# Available rules: https://github.com/securego/gosec#available-rules
# Default: [] - means include all rules
includes:
# - G101 # Look for hard coded credentials
- G102 # Bind to all interfaces
- G103 # Audit the use of unsafe block
- G104 # Audit errors not checked
- G106 # Audit the use of ssh.InsecureIgnoreHostKey
- G107 # Url provided to HTTP request as taint input
- G108 # Profiling endpoint automatically exposed on /debug/pprof
- G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
- G110 # Potential DoS vulnerability via decompression bomb
- G111 # Potential directory traversal
- G112 # Potential slowloris attack
- G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
- G114 # Use of net/http serve function that has no support for setting timeouts
- G201 # SQL query construction using format string
- G202 # SQL query construction using string concatenation
- G203 # Use of unescaped data in HTML templates
- G204 # Audit use of command execution
- G301 # Poor file permissions used when creating a directory
- G302 # Poor file permissions used with chmod
- G303 # Creating tempfile using a predictable path
- G304 # File path provided as taint input
- G305 # File traversal when extracting zip/tar archive
- G306 # Poor file permissions used when writing to a new file
- G307 # Deferring a method which returns an error
- G401 # Detect the usage of DES, RC4, MD5 or SHA1
- G402 # Look for bad TLS connection settings
- G403 # Ensure minimum RSA key length of 2048 bits
- G404 # Insecure random number source (rand)
- G501 # Import blocklist: crypto/md5
- G502 # Import blocklist: crypto/des
- G503 # Import blocklist: crypto/rc4
- G504 # Import blocklist: net/http/cgi
- G505 # Import blocklist: crypto/sha1
- G601 # Implicit memory aliasing of items from a range statement
misspell:
locale: US
gofumpt:
extra-rules: true
dogsled:
max-blank-identifiers: 8
maligned:
suggest-new: true
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: true
require-specific: false
gosimple:
checks: ["all"]
gocritic:
disabled-checks:
- regexpMust
- appendAssign
- ifElseChain
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(cosmossdk.io)
- prefix(github.com/cosmos/cosmos-sdk)
custom-order: true
gofumpt:
extra-rules: true
exclusions:
generated: lax
paths:
- server/grpc/gogoreflection/fix_registration.go
- fix_registration.go
- .*\.pb\.go$
- .*\.pb\.gw\.go$
- .*\.pulsar\.go$
- crypto/keys/secp256k1/internal/*
- testutil/testdata
- third_party$
- builtin$
- examples$
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ build-with-checksum: build-linux-with-checksum build-darwin-with-checksum
### Linting ###
###############################################################################
# Golangci-lint version
golangci_version=v1.64.0
golangci_toolchain=go1.24.13
golangci_version=v2.11.4

#? setup-pre-commit: Set pre-commit git hook
setup-pre-commit:
Expand All @@ -92,7 +91,7 @@ setup-pre-commit:
#? lint-install: Install golangci-lint
lint-install:
@echo "--> Installing golangci-lint $(golangci_version)"
@GOTOOLCHAIN=$(golangci_toolchain) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(golangci_version)

#? lint: Run golangci-lint
lint:
Expand Down Expand Up @@ -296,7 +295,7 @@ local-image:
ifeq (,$(shell which heighliner))
echo 'heighliner' binary not found. Consider running `make get-heighliner`
else
heighliner build -c layer --local --dockerfile cosmos --go-version 1.24.13 --alpine-version 3.22 --build-target "make install" --binaries "/go/bin/layerd"
heighliner build -c layer --local --dockerfile cosmos --build-target "make install" --binaries "/go/bin/layerd"
endif

get-localic:
Expand Down
Loading
Loading