Skip to content

Update golangci-lint #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
go-version: 1.14
- name: Build
run: make all
run: make ci
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 9 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ linters-settings:
local-prefixes: github.com/golang-templates/seed
golint:
min-confidence: 0
govet:
check-shadowing: true
misspell:
locale: US
nolintlint:
Expand Down Expand Up @@ -33,6 +35,7 @@ linters:
- depguard
- dogsled
- dupl
- exportloopref
- funlen
- gochecknoglobals
- gochecknoinits
Expand All @@ -44,6 +47,7 @@ linters:
- godox
- goerr113
- gofmt
- gofumpt
- goimports
- golint
- gomnd
Expand All @@ -56,16 +60,20 @@ linters:
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- prealloc
- rowserrcheck
- scopelint
- sqlclosecheck
- stylecheck
# - testpackage
- unconvert
- unparam
- whitespace
- wsl
# don't enable:
# - go-header
# - testpackage

issues:
# enable issues excluded by default
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.DEFAULT_GOAL := help

.PHONY: all
all: ## full build
all: install generate build fmt lint test mod-tidy build-snapshot diff
.PHONY: ci
all: ## CI build
all: install generate build lint test mod-tidy build-snapshot diff

.PHONY: dev
dev: ## fast build
Expand Down Expand Up @@ -77,7 +77,7 @@ run: ## go run
go run .

.PHONY: docker
docker: ## run in golang container, example: make docker run="make all"
docker: ## run in golang container, example: make docker run="make ci"
docker run --rm \
-v $(CURDIR):/repo $(args) \
-w /repo \
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/golang-templates/seed
go 1.14

require (
github.com/golangci/golangci-lint v1.27.0
github.com/golangci/golangci-lint v1.28.0
github.com/goreleaser/goreleaser v0.138.0
golang.org/x/tools v0.0.0-20200608174601-1b747fd94509
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347
)
Loading