Add Golangci-lint to GitHub Actions and add Deadcode linter (#9597)

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Håvard Anda Estensen 2021-10-04 13:06:21 +02:00 committed by GitHub
parent f7845afa57
commit b793d6258f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 10 deletions

View File

@ -24,7 +24,7 @@ jobs:
uses: ./.github/actions/gofmt
with:
path: ./
- name: GoImports checker
id: goimports
uses: Jerome1337/goimports-action@v1.0.2
@ -35,6 +35,12 @@ jobs:
uses: securego/gosec@master
with:
args: '-exclude-dir=crypto/bls/herumi ./...'
- name: Golangci-lint
uses: golangci/golangci-lint-action@v2
with:
args: --print-issued-lines --sort-results --no-config --timeout=10m --disable-all -E deadcode --skip-files=validator/web/site_data.go
build:
name: Build
runs-on: ubuntu-latest

View File

@ -43,11 +43,6 @@ var eth1DataNotification bool
const eth1dataTimeout = 2 * time.Second
type eth1DataSingleVote struct {
eth1Data *ethpb.Eth1Data
blockHeight *big.Int
}
// blockData required to create a beacon block.
type blockData struct {
ParentRoot []byte

View File

@ -36,10 +36,6 @@ var (
Usage: "Enables the validator to connect to a beacon node using the --slasher flag" +
"for remote slashing protection",
}
disableLookbackFlag = &cli.BoolFlag{
Name: "disable-lookback",
Usage: "Disables use of the lookback feature and updates attestation history for validators from head to epoch 0",
}
disableGRPCConnectionLogging = &cli.BoolFlag{
Name: "disable-grpc-connection-logging",
Usage: "Disables displaying logs for newly connected grpc clients",