Skip to content

Commit e108ee8

Browse files
authored
Update golangci-lint to v1.28.0 (#49)
1 parent 6f7cba7 commit e108ee8

File tree

5 files changed

+130
-8
lines changed

5 files changed

+130
-8
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
go-version: 1.14
2525
- name: Build
26-
run: make all
26+
run: make ci
2727
- name: Upload coverage
2828
uses: actions/upload-artifact@v2
2929
with:

.golangci.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ linters-settings:
33
local-prefixes: github.com/golang-templates/seed
44
golint:
55
min-confidence: 0
6+
govet:
7+
check-shadowing: true
68
misspell:
79
locale: US
810
nolintlint:
@@ -33,6 +35,7 @@ linters:
3335
- depguard
3436
- dogsled
3537
- dupl
38+
- exportloopref
3639
- funlen
3740
- gochecknoglobals
3841
- gochecknoinits
@@ -44,6 +47,7 @@ linters:
4447
- godox
4548
- goerr113
4649
- gofmt
50+
- gofumpt
4751
- goimports
4852
- golint
4953
- gomnd
@@ -56,16 +60,20 @@ linters:
5660
- misspell
5761
- nakedret
5862
- nestif
63+
- noctx
5964
- nolintlint
6065
- prealloc
6166
- rowserrcheck
6267
- scopelint
68+
- sqlclosecheck
6369
- stylecheck
64-
# - testpackage
6570
- unconvert
6671
- unparam
6772
- whitespace
6873
- wsl
74+
# don't enable:
75+
# - go-header
76+
# - testpackage
6977

7078
issues:
7179
# enable issues excluded by default

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.DEFAULT_GOAL := help
22

3-
.PHONY: all
4-
all: ## full build
5-
all: install generate build fmt lint test mod-tidy build-snapshot diff
3+
.PHONY: ci
4+
all: ## CI build
5+
all: install generate build lint test mod-tidy build-snapshot diff
66

77
.PHONY: dev
88
dev: ## fast build
@@ -77,7 +77,7 @@ run: ## go run
7777
go run .
7878

7979
.PHONY: docker
80-
docker: ## run in golang container, example: make docker run="make all"
80+
docker: ## run in golang container, example: make docker run="make ci"
8181
docker run --rm \
8282
-v $(CURDIR):/repo $(args) \
8383
-w /repo \

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/golang-templates/seed
33
go 1.14
44

55
require (
6-
github.com/golangci/golangci-lint v1.27.0
6+
github.com/golangci/golangci-lint v1.28.0
77
github.com/goreleaser/goreleaser v0.138.0
8-
golang.org/x/tools v0.0.0-20200608174601-1b747fd94509
8+
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347
99
)

0 commit comments

Comments
 (0)