mirror of
https://github.com/jimeh/undent.git
synced 2026-02-19 03:56:38 +00:00
chore(deps): update golangci-lint
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
|||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: v1.37
|
version: v1.50
|
||||||
env:
|
env:
|
||||||
VERBOSE: "true"
|
VERBOSE: "true"
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ linters-settings:
|
|||||||
golint:
|
golint:
|
||||||
min-confidence: 0
|
min-confidence: 0
|
||||||
govet:
|
govet:
|
||||||
check-shadowing: true
|
|
||||||
enable-all: true
|
enable-all: true
|
||||||
|
disable:
|
||||||
|
- fieldalignment
|
||||||
lll:
|
lll:
|
||||||
line-length: 80
|
line-length: 80
|
||||||
tab-width: 4
|
tab-width: 4
|
||||||
@@ -21,10 +22,10 @@ linters:
|
|||||||
disable-all: true
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- deadcode
|
|
||||||
- depguard
|
- depguard
|
||||||
- dupl
|
- dupl
|
||||||
- errcheck
|
- errcheck
|
||||||
|
- exportloopref
|
||||||
- funlen
|
- funlen
|
||||||
- gochecknoinits
|
- gochecknoinits
|
||||||
- goconst
|
- goconst
|
||||||
@@ -32,7 +33,6 @@ linters:
|
|||||||
- gocyclo
|
- gocyclo
|
||||||
- goerr113
|
- goerr113
|
||||||
- goimports
|
- goimports
|
||||||
- golint
|
|
||||||
- goprintffuncname
|
- goprintffuncname
|
||||||
- gosec
|
- gosec
|
||||||
- gosimple
|
- gosimple
|
||||||
@@ -44,19 +44,15 @@ linters:
|
|||||||
- nlreturn
|
- nlreturn
|
||||||
- noctx
|
- noctx
|
||||||
- nolintlint
|
- nolintlint
|
||||||
- scopelint
|
- revive
|
||||||
- sqlclosecheck
|
- sqlclosecheck
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- structcheck
|
|
||||||
- typecheck
|
- typecheck
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
- unused
|
||||||
- varcheck
|
|
||||||
- whitespace
|
- whitespace
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
include:
|
|
||||||
# - EXC0002 # disable excluding of issues about comments from golint
|
|
||||||
exclude:
|
exclude:
|
||||||
- Using the variable on range scope `tt` in function literal
|
- Using the variable on range scope `tt` in function literal
|
||||||
- Using the variable on range scope `tc` in function literal
|
- Using the variable on range scope `tc` in function literal
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -48,7 +48,7 @@ endef
|
|||||||
|
|
||||||
$(eval $(call tool,godoc,golang.org/x/tools/cmd/godoc))
|
$(eval $(call tool,godoc,golang.org/x/tools/cmd/godoc))
|
||||||
$(eval $(call tool,gofumports,mvdan.cc/gofumpt/gofumports))
|
$(eval $(call tool,gofumports,mvdan.cc/gofumpt/gofumports))
|
||||||
$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.37))
|
$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50))
|
||||||
|
|
||||||
.PHONY: tools
|
.PHONY: tools
|
||||||
tools: $(TOOLS)
|
tools: $(TOOLS)
|
||||||
|
|||||||
@@ -717,7 +717,7 @@ func TestPrint(t *testing.T) {
|
|||||||
for _, tt := range stringTestCases {
|
for _, tt := range stringTestCases {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := fakeio.Stdout().Do(func() {
|
got, err := fakeio.Stdout().Do(func() {
|
||||||
Print(tt.s, 5, tt.s)
|
_, _ = Print(tt.s, 5, tt.s)
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
@@ -731,7 +731,7 @@ func TestPrintf(t *testing.T) {
|
|||||||
for _, tt := range stringfTestCases {
|
for _, tt := range stringfTestCases {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got, err := fakeio.Stdout().Do(func() {
|
got, err := fakeio.Stdout().Do(func() {
|
||||||
Printf(tt.s, tt.a...)
|
_, _ = Printf(tt.s, tt.a...)
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
@@ -746,7 +746,7 @@ func TestFprint(t *testing.T) {
|
|||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
|
||||||
Fprint(&buf, tt.s, 5, tt.s)
|
_, _ = Fprint(&buf, tt.s, 5, tt.s)
|
||||||
got := buf.String()
|
got := buf.String()
|
||||||
|
|
||||||
assert.IsType(t, "", got)
|
assert.IsType(t, "", got)
|
||||||
@@ -760,7 +760,7 @@ func TestFprintf(t *testing.T) {
|
|||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
|
||||||
Fprintf(&buf, tt.s, tt.a...)
|
_, _ = Fprintf(&buf, tt.s, tt.a...)
|
||||||
got := buf.String()
|
got := buf.String()
|
||||||
|
|
||||||
assert.IsType(t, "", got)
|
assert.IsType(t, "", got)
|
||||||
|
|||||||
Reference in New Issue
Block a user