Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix: Lint tests + fix e2e #1447

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
63 changes: 61 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 3m
timeout: 10m
tests: true


# Output
output:
format: colored-line-number
print-issued-lines: true



# This file contains only configs which differ from defaults.
Expand Down Expand Up @@ -175,6 +183,56 @@ linters-settings:
# Make an issue if func has more lines of code than this setting, and it has naked returns.
# Default: 30
max-func-lines: 0

revive:
ignore-generated: true
enable-all-rules: true
rules:
- name: dot-imports
disabled: true
- name: unused-parameter # Disabled in favour of unparam.
disabled: true
- name: if-return
disabled: true
- name: max-public-structs
disabled: true
- name: cognitive-complexity
disabled: true
- name: argument-limit
disabled: true
- name: cyclomatic
disabled: true
- name: file-header
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
disabled: true
- name: line-length-limit
disabled: true
- name: flag-parameter
disabled: true
- name: add-constant
disabled: true
- name: empty-lines
disabled: true
- name: banned-characters
disabled: true
- name: deep-exit
disabled: true
- name: confusing-results
disabled: true
- name: unused-parameter
disabled: true
- name: import-shadowing
disabled: true
- name: modifies-value-receiver
disabled: true
- name: early-return
disabled: true
- name: import-alias-naming
disabled: true


nolintlint:
# Exclude following linters from requiring an explanation.
Expand Down Expand Up @@ -320,7 +378,8 @@ issues:
# Maximum count of issues with the same text.
# Set to 0 to disable.
# Default: 3
max-same-issues: 50
max-same-issues: 100
max-issues-per-linter: 100

exclude-rules:
- path: "tools/.*\\.go"
Expand Down
4 changes: 2 additions & 2 deletions build/scripts/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ forge-lint:
# golangci-lint #
#################

golangci_version=v1.54.2
golangci_version=v1.55.2

golangci-install:
@echo "--> Installing golangci-lint $(golangci_version)"
Expand All @@ -322,7 +322,7 @@ golangci:
golangci-fix:
@$(MAKE) golangci-install
@echo "--> Running linter"
@go list -f '{{.Dir}}/...' -m | xargs golangci-lint run --timeout=10m --fix --concurrency 8 -v
@go list -f '{{.Dir}}/...' -m | xargs golangci-lint run --timeout=10m --fix --concurrency 64


#################
Expand Down
28 changes: 15 additions & 13 deletions build/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/golangci/golangci-lint v1.55.2
github.com/google/addlicense v1.1.1
github.com/matryer/moq v0.3.2
github.com/onsi/ginkgo/v2 v2.14.0
github.com/onsi/ginkgo/v2 v2.15.0
github.com/securego/gosec/v2 v2.18.2
github.com/vektra/mockery/v2 v2.34.1
)
Expand Down Expand Up @@ -76,7 +76,7 @@ require (
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/daixiang0/gci v0.11.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.3.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/deepmap/oapi-codegen v1.13.4 // indirect
Expand Down Expand Up @@ -224,7 +224,7 @@ require (
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
Expand All @@ -241,6 +241,8 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/ryancurrah/gomodguard v1.3.0 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.24.0 // indirect
Expand All @@ -251,19 +253,19 @@ require (
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.1 // indirect
github.com/sonatard/noctx v0.0.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/go-diff v0.7.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/spf13/viper v1.18.1 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
Expand Down Expand Up @@ -304,16 +306,16 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.4.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading
Loading