Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ name: Lint Check

on: [pull_request]
jobs:
build:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.19.x
go-version: '1.22'
- name: "Run lint"
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.41
version: v1.57.2
args: --timeout=10m
only-new-issues: true
10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ run:
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
skip-files:
- core/genesis_alloc.go

linters:
disable-all: true
enable:
- deadcode
#- deadcode
- goconst
- goimports
- gosimple
Expand All @@ -21,8 +19,8 @@ linters:
- misspell
# - staticcheck
- unconvert
# - unused
- varcheck
- unused
#- varcheck

linters-settings:
gofmt:
Expand All @@ -33,6 +31,8 @@ linters-settings:

issues:
new: true
exclude-files:
- core/genesis_alloc.go
exclude-rules:
- path: crypto/blake2b/
linters:
Expand Down
10 changes: 8 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ import (
"gopkg.in/urfave/cli.v1"
)

const test = 1

func init() {
cli.AppHelpTemplate = `{{.Name}} {{if .Flags}}[global options] {{end}}command{{if .Flags}} [command options]{{end}} [arguments...]

Expand Down Expand Up @@ -620,8 +622,8 @@ var (
AllowUnprotectedTxs = cli.BoolFlag{
Name: "rpc.allow-unprotected-txs",
Usage: "Allow for unprotected (non EIP155 signed) transactions to be submitted via RPC",
}
BatchRequestLimit = cli.IntFlag{ //nolint:typecheck
} //nolint:typecheck
BatchRequestLimit = cli.IntFlag{
Name: "rpc.batch-request-limit",
Usage: "Maximum number of requests in a batch(only supported in http)",
Value: node.DefaultConfig.BatchRequestLimit,
Expand Down Expand Up @@ -887,10 +889,14 @@ func setBootstrapNodes(ctx *cli.Context, cfg *p2p.Config) {
}
}
}
func invalideCase() {
fmt.Println("Hello, worlld!")
}

// setBootstrapNodesV5 creates a list of bootstrap nodes from the command line
// flags, reverting to pre-configured ones if none have been specified.
func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
invalideCase()
urls := params.V5Bootnodes
switch {
case ctx.GlobalIsSet(BootnodesFlag.Name):
Expand Down