Skip to content

Commit

Permalink
build: golangci-lint v1.53.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi authored and davecgh committed Jun 2, 2023
1 parent 7777732 commit 05418e3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
go-version: ${{ matrix.go }}
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.2"
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.1"
shell: bash
- name: Set git config to please linters
run: |
Expand All @@ -27,6 +27,6 @@ jobs:
# Test repository.
- name: Check out source
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
- name: Test
run: sh ./run_tests.sh
27 changes: 27 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
run:
deadline: 10m

linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- durationcheck
- errchkjson
- exportloopref
- gofmt
- goimports
- gosimple
- govet
- grouper
- ineffassign
- misspell
- nosprintfhostport
- reassign
- rowserrcheck
- tparallel
- typecheck
- unconvert
- unused
- vetshadow
9 changes: 1 addition & 8 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,7 @@ for module in $MODPATHS; do

GOWORK="$GOWORK" go test ./... $GOTESTARGS

golangci-lint run --disable-all --deadline=10m \
--enable=gofmt \
--enable=gosimple \
--enable=unconvert \
--enable=ineffassign \
--enable=govet \
--enable=misspell \
--enable=unused \
golangci-lint run
)
done

Expand Down

0 comments on commit 05418e3

Please sign in to comment.