diff --git a/go.mod b/go.mod index 93f3e56de741..bd54290bb207 100644 --- a/go.mod +++ b/go.mod @@ -93,7 +93,7 @@ require ( github.com/spf13/viper v1.12.0 github.com/ssgreg/nlreturn/v2 v2.2.1 github.com/stbenjam/no-sprintf-host-port v0.1.1 - github.com/stevenh/go-uncalled v0.7.1 + github.com/stevenh/go-uncalled v0.7.3 github.com/stretchr/testify v1.8.1 github.com/tdakkota/asciicheck v0.1.1 github.com/tetafro/godot v1.4.11 diff --git a/go.sum b/go.sum index 5f85fa7f4d17..afe4883ed8ff 100644 --- a/go.sum +++ b/go.sum @@ -516,12 +516,8 @@ github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YE github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= -github.com/stevenh/go-uncalled v0.5.0 h1:oHVQm8N0mdVBq55GH02wiht4fFM3gVFBc5N7BeZlJ1I= -github.com/stevenh/go-uncalled v0.5.0/go.mod h1:ejM8/UAWnsuI68d3Fpy/lLXwpdrvoweCSutU/Z4kNjc= -github.com/stevenh/go-uncalled v0.7.0 h1:0w7kXgJoLH40y0NLTJARXywi0ZKTMITCes8vsunvVp8= -github.com/stevenh/go-uncalled v0.7.0/go.mod h1:ejM8/UAWnsuI68d3Fpy/lLXwpdrvoweCSutU/Z4kNjc= -github.com/stevenh/go-uncalled v0.7.1 h1:6C3aV7txvAW9Ip0kN7l1jM8Pb315hhlKzYObBdt3xJg= -github.com/stevenh/go-uncalled v0.7.1/go.mod h1:ejM8/UAWnsuI68d3Fpy/lLXwpdrvoweCSutU/Z4kNjc= +github.com/stevenh/go-uncalled v0.7.3 h1:nME2E+qUieDR2dC8gFJdo9BeV153rsu0NVwCBr42qKg= +github.com/stevenh/go-uncalled v0.7.3/go.mod h1:ejM8/UAWnsuI68d3Fpy/lLXwpdrvoweCSutU/Z4kNjc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index 038840da9347..64a1f8eae5ae 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -109,6 +109,7 @@ var defaultLintersSettings = LintersSettings{ SkipRegexp: `(export|internal)_test\.go`, AllowPackages: []string{"main"}, }, + Uncalled: uncalled.DefaultConfig(), Unparam: UnparamSettings{ Algo: "cha", }, diff --git a/test/linters_test.go b/test/linters_test.go index 159e76c8bb56..2e54ea95a9e7 100644 --- a/test/linters_test.go +++ b/test/linters_test.go @@ -30,6 +30,7 @@ func TestTypecheck(t *testing.T) { func TestSourcesFromTestdataSubDir(t *testing.T) { subDirs := []string{ "loggercheck", + "uncalled", } for _, dir := range subDirs { diff --git a/test/testdata/uncalled/uncalled.go b/test/testdata/uncalled/uncalled.go index 42cc8416cd7b..e71f7c180316 100644 --- a/test/testdata/uncalled/uncalled.go +++ b/test/testdata/uncalled/uncalled.go @@ -1,4 +1,4 @@ -//golangcitest:args -Erowserr +//golangcitest:args -Euncalled package testdata import ( @@ -6,7 +6,7 @@ import ( ) func RowsErrNotChecked(db *sql.DB) { - rows, err := db.Query("select id from tb") // want "rows.Err\\(\\) must be checked" + rows, err := db.Query("select id from tb") // want "rows.Err\\(\\) must be called" if err != nil { // Handle error. }