-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
270 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# This file configures github.com/golangci/golangci-lint. | ||
|
||
run: | ||
timeout: 20m | ||
tests: true | ||
# 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: | ||
- goconst | ||
- goimports | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- unconvert | ||
- typecheck | ||
- unused | ||
- staticcheck | ||
- bidichk | ||
- durationcheck | ||
- exportloopref | ||
- whitespace | ||
|
||
# - structcheck # lots of false positives | ||
# - errcheck #lot of false positives | ||
# - contextcheck | ||
# - errchkjson # lots of false positives | ||
# - errorlint # this check crashes | ||
# - exhaustive # silly check | ||
# - makezero # false positives | ||
# - nilerr # several intentional | ||
|
||
linters-settings: | ||
gofmt: | ||
simplify: true | ||
goconst: | ||
min-len: 3 # minimum length of string constant | ||
min-occurrences: 6 # minimum number of occurrences | ||
|
||
issues: | ||
exclude-rules: | ||
- path: crypto/bn256/cloudflare/optate.go | ||
linters: | ||
- deadcode | ||
- staticcheck | ||
- path: internal/build/pgp.go | ||
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.' | ||
- path: core/vm/contracts.go | ||
text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.' | ||
- path: accounts/usbwallet/trezor.go | ||
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.' | ||
- path: accounts/usbwallet/trezor/ | ||
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.' | ||
exclude: | ||
- 'SA1019: event.TypeMux is deprecated: use Feed' | ||
- 'SA1019: strings.Title is deprecated' | ||
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.' | ||
- 'SA1029: should not use built-in type string as key for value' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
package client | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gin-gonic/gin" | ||
"github.com/prometheus/client_golang/prometheus/promhttp" | ||
"testing" | ||
) | ||
|
||
func Test_Unite_Convert(t *testing.T) { | ||
t.Run("", func(t *testing.T) { | ||
t.Run("TestServer", func(t *testing.T) { | ||
app := gin.New() | ||
app.GET("/metrics", PromHandler(promhttp.Handler())) | ||
app.POST("/eth_proxy/:chain_id", NewGinMethodConvert(GetDefaultConfPool()).ConvertGinHandler) | ||
app.POST("/", NewGinMethodConvert(GetDefaultConfPool()).ConvertGinHandler) | ||
_ = app.Run(":8545") | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.