Skip to content

Commit

Permalink
ci: freeze golangci action version (cosmos#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored and erikgrinaker committed Nov 6, 2020
1 parent e73bdda commit 69dd35b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Lint
on:
on:
pull_request:
push:
branches:
branches:
- master
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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.29
version: v1.30
args: --timeout 10m
github-token: ${{ secrets.github_token }}
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ linters:

issues:
exclude-rules:
- path: _test\.go
linters:
- gosec
- linters:
- lll
source: "https://"
Expand Down
2 changes: 1 addition & 1 deletion common/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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
}

//----------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions tree_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func genRandomProgram(size int) *program {
for p.size() < size {
k, v := []byte(cmn.RandStr(1)), []byte(cmn.RandStr(1))

switch rand.Int() % 7 { //nolint: gosec // Turn off gosec here because this is for testing
switch rand.Int() % 7 {
case 0, 1, 2:
p.addInstruction(instruction{op: "SET", k: k, v: v})
case 3, 4:
Expand All @@ -97,7 +97,7 @@ func genRandomProgram(size int) *program {
p.addInstruction(instruction{op: "SAVE", version: int64(nextVersion)})
nextVersion++
case 6:
if rv := rand.Int() % nextVersion; rv < nextVersion && rv > 0 { //nolint: gosec // Turn off gosec here because this is for testing
if rv := rand.Int() % nextVersion; rv < nextVersion && rv > 0 {
p.addInstruction(instruction{op: "DELETE", version: int64(rv)})
}
}
Expand Down

0 comments on commit 69dd35b

Please sign in to comment.