diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0a27fc..e2e5275 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,17 +11,7 @@ on: jobs: lint: name: Lint - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: 'go.mod' - - name: golangci-lint - uses: golangci/golangci-lint-action@v4 - with: - version: latest + uses: nspcc-dev/.github/.github/workflows/go-linter.yml@master cover: name: Coverage diff --git a/.gitignore b/.gitignore index f5c4b98..38f1315 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ bin/ tmp/ .idea +.golangci.yml diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 7cc84e2..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,29 +0,0 @@ -run: - timeout: 5m - tests: false - -output: - formats: - - format: tab - -linters-settings: - exhaustive: - default-signifies-exhaustive: true - -linters: - enable: - - govet - - revive - - - errcheck - - gosimple - - ineffassign - - staticcheck - - typecheck - - - exhaustive - - gofmt - - whitespace - - goimports - disable-all: true - fast: false diff --git a/Makefile b/Makefile index f4ec192..6733f10 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,11 @@ clean: version: @echo ${VERSION} +.golangci.yml: + wget -O $@ https://github.com/nspcc-dev/.github/raw/master/.golangci.yml + # Run linters -lint: +lint: .golangci.yml @golangci-lint --timeout=5m run # Run tests diff --git a/cmd/neo-exporter/config.go b/cmd/neo-exporter/config.go index 70e1faa..7fcc28b 100644 --- a/cmd/neo-exporter/config.go +++ b/cmd/neo-exporter/config.go @@ -11,10 +11,10 @@ import ( const ( delimiter = "." - // contracts scripthash + // contracts scripthash. cfgNeoFSContract = "contracts.neofs" - // neo rpc node related config values + // neo rpc node related config values. prefix = "chain" cfgChainFSChain = "chain.fschain" @@ -23,11 +23,11 @@ const ( cfgNeoRPCDialTimeout = "rpc.dial_timeout" cfgNeoRPCRecheckInterval = "rpc.health_recheck_interval" - // monitor prometheus expose config values + // monitor prometheus expose config values. cfgMetricsEndpoint = "metrics.endpoint" cfgMetricsInterval = "metrics.interval" - // level of logging + // level of logging. cfgLoggerLevel = "logger.level" ) diff --git a/pkg/morphchain/contracts/netmap.go b/pkg/morphchain/contracts/netmap.go index debfbaa..3ed4479 100644 --- a/pkg/morphchain/contracts/netmap.go +++ b/pkg/morphchain/contracts/netmap.go @@ -21,9 +21,8 @@ import ( type ( Netmap struct { - pool *pool.Pool - logger *zap.Logger - notaryDisabled bool + pool *pool.Pool + logger *zap.Logger contractReader *rpcnetmap.ContractReader }