Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7eabc2c

Browse files
committed
core: add default config
Add default config, correct want and fix linter name.
1 parent396bdb1 commit7eabc2c

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ require (
9393
github.com/spf13/viperv1.12.0
9494
github.com/ssgreg/nlreturn/v2v2.2.1
9595
github.com/stbenjam/no-sprintf-host-portv0.1.1
96-
github.com/stevenh/go-uncalledv0.7.1
96+
github.com/stevenh/go-uncalledv0.7.3
9797
github.com/stretchr/testifyv1.8.1
9898
github.com/tdakkota/asciicheckv0.1.1
9999
github.com/tetafro/godotv1.4.11

‎go.sum‎

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎pkg/config/linters_settings.go‎

Lines changed: 1 addition & 0 deletions
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‎

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

3536
for_,dir:=rangesubDirs {

‎test/testdata/uncalled/uncalled.go‎

Lines changed: 2 additions & 2 deletions
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
funcRowsErrNotChecked(db*sql.DB) {
9-
rows,err:=db.Query("select id from tb")// want "rows.Err\\(\\) must bechecked"
9+
rows,err:=db.Query("select id from tb")// want "rows.Err\\(\\) must becalled"
1010
iferr!=nil {
1111
// Handle error.
1212
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp