mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
ci: freeze golangci action version (#5196)
## Description This PR updates golang-ci to latest and stops looking at master for the action. Closes: #XXX
This commit is contained in:
4
.github/workflows/lint.yaml
vendored
4
.github/workflows/lint.yaml
vendored
@@ -20,10 +20,10 @@ jobs:
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
- uses: golangci/golangci-lint-action@master
|
||||
- uses: golangci/golangci-lint-action@v2.1.0
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v1.28
|
||||
version: v1.30
|
||||
args: --timeout 10m
|
||||
github-token: ${{ secrets.github_token }}
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
@@ -44,6 +44,9 @@ linters:
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- gosec
|
||||
- linters:
|
||||
- lll
|
||||
source: "https://"
|
||||
@@ -58,7 +61,3 @@ linters-settings:
|
||||
# check-shadowing: true
|
||||
golint:
|
||||
min-confidence: 0
|
||||
# gocyclo:
|
||||
# min-complexity: 10
|
||||
# misspell:
|
||||
# locale: US
|
||||
|
||||
@@ -26,7 +26,7 @@ func TestKeyPath(t *testing.T) {
|
||||
keys[i][j] = alphanum[rand.Intn(len(alphanum))]
|
||||
}
|
||||
case KeyEncodingHex:
|
||||
rand.Read(keys[i]) //nolint: gosec
|
||||
rand.Read(keys[i])
|
||||
default:
|
||||
panic("Unexpected encoding")
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (r *Rand) init() {
|
||||
}
|
||||
|
||||
func (r *Rand) reset(seed int64) {
|
||||
r.rand = mrand.New(mrand.NewSource(seed))
|
||||
r.rand = mrand.New(mrand.NewSource(seed)) // nolint:gosec // G404: Use of weak random number generator
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
@@ -1309,6 +1309,7 @@ func (c *Client) sendConflictingHeadersEvidence(ev *types.ConflictingHeadersEvid
|
||||
// exponential backoff (with jitter)
|
||||
// 0.5s -> 2s -> 4.5s -> 8s -> 12.5 with 1s variation
|
||||
func backoffTimeout(attempt uint16) time.Duration {
|
||||
// nolint:gosec // G404: Use of weak random number generator
|
||||
return time.Duration(500*attempt*attempt)*time.Millisecond + time.Duration(rand.Intn(1000))*time.Millisecond
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ func (r *remoteClientCreator) NewABCIClient() (abcicli.Client, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to connect to proxy: %w", err)
|
||||
}
|
||||
|
||||
return remoteApp, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ func TestServeTLS(t *testing.T) {
|
||||
go ServeTLS(ln, mux, "test.crt", "test.key", log.TestingLogger(), DefaultConfig())
|
||||
|
||||
tr := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // nolint: gosec
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
}
|
||||
c := &http.Client{Transport: tr}
|
||||
res, err := c.Get("https://" + ln.Addr().String())
|
||||
|
||||
@@ -140,7 +140,7 @@ func (p *snapshotPool) GetPeer(snapshot *snapshot) p2p.Peer {
|
||||
if len(peers) == 0 {
|
||||
return nil
|
||||
}
|
||||
return peers[rand.Intn(len(peers))]
|
||||
return peers[rand.Intn(len(peers))] // nolint:gosec // G404: Use of weak random number generator
|
||||
}
|
||||
|
||||
// GetPeers returns the peers for a snapshot.
|
||||
|
||||
Reference in New Issue
Block a user