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

New Release #688

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4b368a0
dragonberry upgrade
cyborgshead Oct 14, 2022
9a1aaeb
Additional Dragonberry Related Erratta (they matter a lot, if we don'…
faddat Oct 16, 2022
594b9d0
code formatting changes and the like
faddat Oct 16, 2022
aa99780
Started bump deps
cyborgshead Mar 6, 2023
a5abf3c
Started bump deps
cyborgshead Mar 6, 2023
5ff6f7f
Added token factory module
cyborgshead Mar 22, 2023
121e358
Updated proto gen
cyborgshead Mar 31, 2023
6964b76
Removed third_party
cyborgshead Mar 31, 2023
ae65e3c
Merge branch 'deps' into token-factory
cyborgshead Apr 1, 2023
316bc8c
Updated paths and proto
cyborgshead Apr 1, 2023
dcd73e7
Proto and lint
cyborgshead Apr 4, 2023
b58fcc6
Updated deps
cyborgshead Apr 4, 2023
f232e84
Merge branch 'deps' into token-factory
cyborgshead Apr 4, 2023
bc4814e
use sdk v0.45.16
faddat Jun 12, 2023
a21d909
use correct iavldisablefastnode flag
faddat Jun 12, 2023
4948931
cosmwasm v0.32.1 and wasmvm v1.2.4
faddat Jun 12, 2023
3a34649
state-breaking upgrade with ica host, intertx, and ica controller and…
faddat Jun 12, 2023
8dec168
Merge remote-tracking branch 'faddat/45-with-breaking-changes' into d…
cyborgshead Jun 29, 2023
b383d11
Refactoring, tests passed
cyborgshead Jun 30, 2023
5b8a17b
Merge branch 'deps-45-bump' into token-factory
cyborgshead Jun 30, 2023
2eaf44f
bumps and tidy
faddat Jul 27, 2023
cc95fed
lint the codebase
faddat Jul 27, 2023
0440650
continue to lint
faddat Jul 27, 2023
06edda4
naked returns
faddat Jul 27, 2023
260780f
add test helpers
faddat Jul 27, 2023
893b93d
further linting
faddat Jul 27, 2023
a9d7647
test helpers
faddat Jul 27, 2023
f1b58f1
unnecessary conversions
faddat Jul 27, 2023
54d7d61
return value ordering and bool constants
faddat Jul 27, 2023
115f473
comparisons to bool constant
faddat Jul 27, 2023
741c58b
add linter config from sdk 50
faddat Jul 27, 2023
5ed8e75
composites
faddat Jul 27, 2023
6ef66c4
mainly complete linting task
faddat Jul 28, 2023
b66a06b
resolve questions about filepath.Join
faddat Jul 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 55 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: golangci-lint
on:
push:
branches:
- master
- main
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.53

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ testnet
# Testing
coverage.txt
profile.out
testnets

# Vagrant
.vagrant/
Expand Down
147 changes: 147 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
run:
tests: true
timeout: 15m
sort-results: true
allow-parallel-runners: true
exclude-dir: testutil/testdata
skip-files:
- server/grpc/gogoreflection/fix_registration.go
- ".*\\.pb\\.go$"
- ".*\\.pb\\.gw\\.\\.go$"
- ".*\\.pulsar\\.go$"

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

issues:
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
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: 6
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
Loading