Skip to content

Commit faffbe3

Browse files
authored
task: update GOLANGCI_VERSION (#32)
1 parent ae83648 commit faffbe3

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

.github/workflows/pr.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,21 @@ jobs:
1515
- name: Install Go
1616
uses: actions/setup-go@v3
1717
with:
18-
go-version: 1.17
18+
go-version: 1.19
1919
- name: lint
2020
uses: golangci/[email protected]
2121
with:
22-
version: v1.49.0
22+
version: v1.50.1
2323

2424
tests-on-unix:
2525
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
2929
golang:
30-
- 1.18
31-
- 1.19
30+
- "1.18"
31+
- "1.19"
32+
- "1.20"
3233
steps:
3334
- name: Checkout repository
3435
uses: actions/checkout@v3

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ linters:
6060
disable-all: true
6161
enable:
6262
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
63-
- deadcode # Finds unused code [fast: false, auto-fix: false]
6463
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: false, auto-fix: false]
6564
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
6665
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false]
@@ -87,20 +86,19 @@ linters:
8786
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [fast: false, auto-fix: false]
8887
- rowserrcheck # checks whether Err of rows is checked successfully [fast: false, auto-fix: false]
8988
- staticcheck #megacheck): Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
90-
- structcheck # Finds unused struct fields [fast: false, auto-fix: false]
9189
- stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false]
9290
- tagliatelle # Checks the struct tags. [fast: true, auto-fix: false]
9391
- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers [fast: false, auto-fix: false]
9492
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: false, auto-fix: false]
9593
- unconvert # Remove unnecessary type conversions [fast: false, auto-fix: false]
9694
- unparam # Reports unused function parameters [fast: false, auto-fix: false]
9795
- unused # Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false]
98-
- varcheck # Finds unused global variables and constants [fast: false, auto-fix: false]
9996
- whitespace # Tool for detection of leading and trailing whitespace [fast: true, auto-fix: true]
10097

10198
# don't enable:
10299
# - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false]
103100
# - cyclop # checks function and package cyclomatic complexity [fast: false, auto-fix: false]
101+
# - deadcode # Finds unused code [fast: false, auto-fix: false]
104102
# - dupl # Tool for code clone detection [fast: true, auto-fix: false]
105103
# - durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
106104
# - exhaustivestruct # Checks if all struct's fields are initialized [fast: false, auto-fix: false]
@@ -131,8 +129,10 @@ linters:
131129
# - promlinter # Check Prometheus metrics naming via promlint [fast: true, auto-fix: false]
132130
# - scopelint # Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false]
133131
# - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed. [fast: false, auto-fix: false]
132+
# - structcheck # Finds unused struct fields [fast: false, auto-fix: false]
134133
# - testpackage # linter that makes you use a separate _test package [fast: true, auto-fix: false]
135134
# - tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: false, auto-fix: false]
135+
# - varcheck # Finds unused global variables and constants [fast: false, auto-fix: false]
136136
# - wastedassign # wastedassign finds wasted assignment statements. [fast: false, auto-fix: false]
137137
# - wrapcheck # Checks that errors returned from external packages are wrapped [fast: false, auto-fix: false]
138138
# - wsl # Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
22

33
SOURCE_FILES?=./...
4-
GOLANGCI_VERSION=v1.49.0
4+
GOLANGCI_VERSION=v1.50.1
55
COVERAGE=coverage.out
66

77
export PATH := ./bin:$(PATH)

cobra2snooty_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package cobra2snooty
1717
import (
1818
"bytes"
1919
"fmt"
20-
"io/ioutil"
2120
"os"
2221
"path/filepath"
2322
"strings"
@@ -190,7 +189,7 @@ func TestGenTreeDocs(t *testing.T) {
190189
},
191190
}
192191

193-
tmpdir, err := ioutil.TempDir("", "test-gen-rst-tree")
192+
tmpdir, err := os.MkdirTemp("", "test-gen-rst-tree")
194193
if err != nil {
195194
t.Fatalf("Failed to create tmpdir: %s", err.Error())
196195
}
@@ -206,7 +205,7 @@ func TestGenTreeDocs(t *testing.T) {
206205
}
207206

208207
func BenchmarkGenDocsToFile(b *testing.B) {
209-
file, err := ioutil.TempFile("", "")
208+
file, err := os.CreateTemp("", "")
210209
if err != nil {
211210
b.Fatal(err)
212211
}

0 commit comments

Comments
 (0)