Skip to content

Commit 74ff08f

Browse files
committed
govet: add stdversion analyzer
1 parent e1a63e3 commit 74ff08f

File tree

5 files changed

+8
-0
lines changed

5 files changed

+8
-0
lines changed

.golangci.next.reference.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,8 @@ linters-settings:
18011801
- sortslice
18021802
# Check signature of methods of well-known interfaces.
18031803
- stdmethods
1804+
# Check for uses of too-new standard library symbols.
1805+
- stdversion
18041806
# Check for string(int) conversions.
18051807
- stringintconv
18061808
# Check that struct field tags conform to reflect.StructTag.Get.

.golangci.reference.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,8 @@ linters-settings:
18011801
- sortslice
18021802
# Check signature of methods of well-known interfaces.
18031803
- stdmethods
1804+
# Check for uses of too-new standard library symbols.
1805+
- stdversion
18041806
# Check for string(int) conversions.
18051807
- stringintconv
18061808
# Check that struct field tags conform to reflect.StructTag.Get.

jsonschema/golangci.jsonschema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
"slog",
201201
"sortslice",
202202
"stdmethods",
203+
"stdversion",
203204
"stringintconv",
204205
"structtag",
205206
"testinggoroutine",

jsonschema/golangci.next.jsonschema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
"slog",
201201
"sortslice",
202202
"stdmethods",
203+
"stdversion",
203204
"stringintconv",
204205
"structtag",
205206
"testinggoroutine",

pkg/golinters/govet/govet.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import (
4040
"golang.org/x/tools/go/analysis/passes/slog"
4141
"golang.org/x/tools/go/analysis/passes/sortslice"
4242
"golang.org/x/tools/go/analysis/passes/stdmethods"
43+
"golang.org/x/tools/go/analysis/passes/stdversion"
4344
"golang.org/x/tools/go/analysis/passes/stringintconv"
4445
"golang.org/x/tools/go/analysis/passes/structtag"
4546
"golang.org/x/tools/go/analysis/passes/testinggoroutine"
@@ -89,6 +90,7 @@ var (
8990
slog.Analyzer,
9091
sortslice.Analyzer,
9192
stdmethods.Analyzer,
93+
stdversion.Analyzer,
9294
stringintconv.Analyzer,
9395
structtag.Analyzer,
9496
testinggoroutine.Analyzer,

0 commit comments

Comments
 (0)