Skip to content

Commit 261721b

Browse files
authored
Fix linter (#943)
* fix lint * remove linters
1 parent be2e238 commit 261721b

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

.github/workflows/pr.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
- name: Setup Go
1414
uses: actions/setup-go@v5
1515
with:
16-
go-version: '1.21'
16+
go-version: '1.24'
1717
- name: Run vet
1818
run: |
1919
go vet .
2020
- name: Run golangci-lint
2121
uses: golangci/golangci-lint-action@v6
2222
with:
23-
version: v1.63.4
23+
version: v1.64.5
2424
- name: Run tests
2525
run: go test -race -covermode=atomic -coverprofile=coverage.out -v .
2626
- name: Upload coverage reports to Codecov

.golangci.yml

-14
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ linters-settings:
139139
# Default: false
140140
all: true
141141

142-
varcheck:
143-
# Check usage of exported fields and variables.
144-
# Default: false
145-
exported-fields: false # default false # TODO: enable after fixing false positives
146-
147142

148143
linters:
149144
disable-all: true
@@ -167,9 +162,7 @@ linters:
167162
- durationcheck # check for two durations multiplied together
168163
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
169164
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
170-
# Removed execinquery (deprecated). execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
171165
- exhaustive # check exhaustiveness of enum switch statements
172-
- exportloopref # checks for pointers to enclosing loop variables
173166
- forbidigo # Forbids identifiers
174167
- funlen # Tool for detection of long functions
175168
# - gochecknoglobals # check that no global variables exist
@@ -201,7 +194,6 @@ linters:
201194
- rowserrcheck # checks whether Err of rows is checked successfully
202195
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
203196
- stylecheck # Stylecheck is a replacement for golint
204-
- tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
205197
- testpackage # linter that makes you use a separate _test package
206198
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
207199
- unconvert # Remove unnecessary type conversions
@@ -239,12 +231,6 @@ linters:
239231
#- tagliatelle # Checks the struct tags.
240232
#- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers
241233
#- wsl # [too strict and mostly code is not more readable] Whitespace Linter - Forces you to use empty lines!
242-
## deprecated
243-
#- exhaustivestruct # [deprecated, replaced by exhaustruct] Checks if all struct's fields are initialized
244-
#- golint # [deprecated, replaced by revive] Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
245-
#- interfacer # [deprecated] Linter that suggests narrower interface types
246-
#- maligned # [deprecated, replaced by govet fieldalignment] Tool to detect Go structs that would take less memory if their fields were sorted
247-
#- scopelint # [deprecated, replaced by exportloopref] Scopelint checks for unpinned variables in go programs
248234

249235

250236
issues:

0 commit comments

Comments
 (0)