Fix lint errors (which are actually bugs in linting dependencies) (#114)
Some checks failed
Pull Request Labeler / triage (push) Successful in 2s
Lint / Run flake8 on python integration tests (push) Failing after 38s
CodeQL / Analyze (go) (push) Failing after 2m7s
Tests / cleanup-runs (push) Has been skipped
Run Gosec / Gosec (push) Failing after 1m31s
Lint / Run golangci-lint (push) Successful in 4m48s
Tests / test-rpc (push) Failing after 4m15s
Tests / sdk_tests (push) Failing after 1m45s
Tests / test-unit-cover (push) Failing after 8m38s
Tests / test-importer (push) Successful in 8m58s

Work around bug https://github.com/golangci/golangci-lint/issues/3906 and https://github.com/cachix/install-nix-action/issues/161 and address other lint/CI issues.

Reviewed-on: cerc-io/laconicd#114
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
This commit is contained in:
Thomas E Lackey 2023-11-21 04:57:52 +00:00 committed by Thomas E Lackey
parent 072b174c9b
commit 976a97234f
7 changed files with 27 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

1
go.mod
View File

@ -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

6
go.sum
View File

@ -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=

View File

@ -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()
@ -28,7 +30,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
},
@ -75,7 +77,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(authorityName string) {
@ -143,7 +145,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(authorityName string) {
@ -195,7 +197,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(bondId string) {
@ -267,7 +269,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(authorityName string) {
@ -339,7 +341,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
}{
{
"invalid url",
reqUrl + "/asdasd",
reqUrl + badPath,
true,
"",
func(bondId string) {
@ -409,7 +411,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) string {
@ -478,7 +480,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByBondID() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) {
@ -532,7 +534,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRegistryModuleBalance() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(bondId string) {
@ -583,7 +585,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryNamesList() {
}{
{
"invalid url",
reqURL + "/asdasd",
reqURL + badPath,
true,
"",
func(authorityName string) {