Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a09d370

Browse files
authoredNov 27, 2024
govet: add stdversion analyzer (#5160)
1 parent b7b77ca commit a09d370

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-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.

‎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)
Please sign in to comment.