Skip to content

Commit

Permalink
Fix lint errors (which are actually bugs in linting dependencies) (#114)
Browse files Browse the repository at this point in the history
Work around bug golangci/golangci-lint#3906 and cachix/install-nix-action#161 and address other lint/CI issues.

Reviewed-on: https://git.vdb.to/cerc-io/laconicd/pulls/114
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
  • Loading branch information
telackey authored and Thomas E Lackey committed Nov 21, 2023
1 parent 072b174 commit 976a972
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 17 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/dependencies.yml
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
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
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
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
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
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
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

0 comments on commit 976a972

Please sign in to comment.