Skip to content

Commit

Permalink
change ci linter (tendermint#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed May 9, 2020
1 parent 6872dc8 commit 56a2f84
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
branches:
- master
pull_request:

jobs:
golangci-lint:
name: runner / golangci-lint
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
# uses: docker://reviewdog/action-golangci-lint:v1 # pre-build docker image
- uses: golangci/golangci-lint-action@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.26
args: --timeout 10m
github-token: ${{ secrets.github_token }}
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ linters:
# - whitespace
# - wsl
# - gocognit
- nolintlint

linters-settings:
maligned:
Expand Down
6 changes: 3 additions & 3 deletions common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func checkValid(t *testing.T, itr Iterator, expected bool) {
}

func checkNext(t *testing.T, itr Iterator, expected bool) {
itr.Next() // nolint:errcheck
itr.Next()
// assert.NoError(t, err) TODO: look at fixing this
valid := itr.Valid()
require.Equal(t, expected, valid)
Expand Down Expand Up @@ -120,7 +120,7 @@ func benchmarkRandomReadsWrites(b *testing.B, db DB) {
for i := 0; i < b.N; i++ {
// Write something
{
idx := rand.Int63n(numItems) // nolint:gosec testing file, so accepting weak random number generator
idx := rand.Int63n(numItems)
internal[idx]++
val := internal[idx]
idxBytes := int642Bytes(idx)
Expand All @@ -135,7 +135,7 @@ func benchmarkRandomReadsWrites(b *testing.B, db DB) {

// Read something
{
idx := rand.Int63n(numItems) // nolint:gosec testing file, so accepting weak random number generator
idx := rand.Int63n(numItems)
valExp := internal[idx]
idxBytes := int642Bytes(idx)
valBytes, err := db.Get(idxBytes)
Expand Down

0 comments on commit 56a2f84

Please sign in to comment.