Skip to content

Commit 01d7604

Browse files
authored
task: update linter version (#384)
1 parent 61aa704 commit 01d7604

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
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.18
18+
go-version: 1.19
1919
- name: lint
2020
uses: golangci/golangci-lint-action@v3.4.0
2121
with:
22-
version: v1.48.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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ linters:
6161
disable-all: true
6262
enable:
6363
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
64-
- deadcode # Finds unused code [fast: false, auto-fix: false]
6564
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: false, auto-fix: false]
6665
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false]
6766
- 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]
@@ -84,20 +83,19 @@ linters:
8483
- nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false]
8584
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [fast: false, auto-fix: false]
8685
- rowserrcheck # checks whether Err of rows is checked successfully [fast: false, auto-fix: false]
87-
- staticcheck #megacheck): Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
88-
- structcheck # Finds unused struct fields [fast: false, auto-fix: false]
86+
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
8987
- stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false]
9088
- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers [fast: false, auto-fix: false]
9189
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: false, auto-fix: false]
9290
- unconvert # Remove unnecessary type conversions [fast: false, auto-fix: false]
9391
- unparam # Reports unused function parameters [fast: false, auto-fix: false]
9492
- unused # Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false]
95-
- varcheck # Finds unused global variables and constants [fast: false, auto-fix: false]
9693
- whitespace # Tool for detection of leading and trailing whitespace [fast: true, auto-fix: true]
9794

9895
# don't enable:
9996
# - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false]
10097
# - cyclop # checks function and package cyclomatic complexity [fast: false, auto-fix: false]
98+
# - deadcode # Finds unused code [fast: false, auto-fix: false]
10199
# - dupl # Tool for code clone detection [fast: true, auto-fix: false]
102100
# - durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
103101
# - exhaustivestruct # Checks if all struct's fields are initialized [fast: false, auto-fix: false]
@@ -130,9 +128,11 @@ linters:
130128
# - promlinter # Check Prometheus metrics naming via promlint [fast: true, auto-fix: false]
131129
# - scopelint # Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false]
132130
# - sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed. [fast: false, auto-fix: false]
131+
# - structcheck # Finds unused struct fields [fast: false, auto-fix: false]
133132
# - testpackage # linter that makes you use a separate _test package [fast: true, auto-fix: false]
134133
# - tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes [fast: false, auto-fix: false]
135134
# - wastedassign # wastedassign finds wasted assignment statements. [fast: false, auto-fix: false]
136135
# - wrapcheck # Checks that errors returned from external packages are wrapped [fast: false, auto-fix: false]
137136
# - wsl # Whitespace Linter - Forces you to use empty lines! [fast: true, auto-fix: false]
137+
# - varcheck # Finds unused global variables and constants [fast: false, auto-fix: false]
138138
# - ifshort # Checks that your code uses short syntax for if-statements whenever possible [fast: true, auto-fix: false]

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SOURCE_FILES?=./...
22
PKG_NAME=mongodbatlas
3-
GOLANGCI_VERSION=v1.48.0
3+
GOLANGCI_VERSION=v1.50.1
44
COVERAGE=coverage.out
55

66
export GO111MODULE := on

0 commit comments

Comments
 (0)