Skip to content

Commit 7eabc2c

Browse files
committed
core: add default config
Add default config, correct want and fix linter name.
1 parent 396bdb1 commit 7eabc2c

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ require (
9393
github.com/spf13/viper v1.12.0
9494
github.com/ssgreg/nlreturn/v2 v2.2.1
9595
github.com/stbenjam/no-sprintf-host-port v0.1.1
96-
github.com/stevenh/go-uncalled v0.7.1
96+
github.com/stevenh/go-uncalled v0.7.3
9797
github.com/stretchr/testify v1.8.1
9898
github.com/tdakkota/asciicheck v0.1.1
9999
github.com/tetafro/godot v1.4.11

go.sum

+2-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ var defaultLintersSettings = LintersSettings{
109109
SkipRegexp: `(export|internal)_test\.go`,
110110
AllowPackages: []string{"main"},
111111
},
112+
Uncalled: uncalled.DefaultConfig(),
112113
Unparam: UnparamSettings{
113114
Algo: "cha",
114115
},

test/linters_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func TestTypecheck(t *testing.T) {
3030
func TestSourcesFromTestdataSubDir(t *testing.T) {
3131
subDirs := []string{
3232
"loggercheck",
33+
"uncalled",
3334
}
3435

3536
for _, dir := range subDirs {

test/testdata/uncalled/uncalled.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//golangcitest:args -Erowserr
1+
//golangcitest:args -Euncalled
22
package testdata
33

44
import (
55
"database/sql"
66
)
77

88
func RowsErrNotChecked(db *sql.DB) {
9-
rows, err := db.Query("select id from tb") // want "rows.Err\\(\\) must be checked"
9+
rows, err := db.Query("select id from tb") // want "rows.Err\\(\\) must be called"
1010
if err != nil {
1111
// Handle error.
1212
}

0 commit comments

Comments
 (0)