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

lint #110

Closed
wants to merge 6 commits into from
Closed

lint #110

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
7 changes: 4 additions & 3 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
if: env.GIT_DIFF
- name: "Go vulnerability check"
run: make vulncheck
if: env.GIT_DIFF
# TODO: https://git.vdb.to/cerc-io/laconicd/issues/115
# - name: "Go vulnerability check"
# run: make vulncheck
# if: env.GIT_DIFF
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: ethermint
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ run:
linters:
enable:
- bodyclose
- depguard
# - depguard # 20231120 disable until https://github.com/golangci/golangci-lint/issues/3906 is released
- dogsled
- dupl
- errcheck
- goconst
- gocritic
- gofumpt
- revive
# - revive # 20231120 overly sensitive unused detection
- gosec
- gosimple
- govet
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ endif

ifeq (, $(shell which go-bindata))
@echo "Installing go-bindata..."
@go get github.com/kevinburke/go-bindata/go-bindata
@go get github.com/kevinburke/go-bindata/go-bindata@v3
else
@echo "go-bindata already installed; skipping..."
endif
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ require (
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/klauspost/compress v1.15.11 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,12 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0=
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
github.com/kevinburke/go-bindata v1.1.0 h1:JZ8XIdxtkAszuYkgf17qwQzcU/RgsGSVLSULJdN+5bU=
github.com/kevinburke/go-bindata v1.1.0/go.mod h1:UJ72WTOoRKzbz+vwtKgARJwsy+1ZGUukVBUCc197TJo=
github.com/kevinburke/go-bindata v3.22.0+incompatible h1:/JmqEhIWQ7GRScV0WjX/0tqBrC5D21ALg0H0U/KZ/ts=
github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY=
github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM=
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc=
Expand Down
22 changes: 12 additions & 10 deletions x/registry/client/testutil/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
tmcli "github.com/tendermint/tendermint/libs/cli"
)

const badPath = "/asdasd"

func (s *IntegrationTestSuite) TestGRPCQueryParams() {
val := s.network.Validators[0]
sr := s.Require()
Expand All @@ -28,7 +30,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
},
Expand Down Expand Up @@ -75,7 +77,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(authorityName string) {
Expand Down Expand Up @@ -143,7 +145,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(authorityName string) {
Expand Down Expand Up @@ -195,7 +197,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(bondId string) {
Expand Down Expand Up @@ -267,7 +269,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(authorityName string) {
Expand Down Expand Up @@ -339,7 +341,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(bondId string) {
Expand Down Expand Up @@ -409,7 +411,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) string {
Expand Down Expand Up @@ -478,7 +480,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByBondID() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) {
Expand Down Expand Up @@ -532,7 +534,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRegistryModuleBalance() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) {
Expand Down Expand Up @@ -583,7 +585,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryNamesList() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(authorityName string) {
Expand Down
Loading