Skip to content

Commit 5d2af72

Browse files
committed
core: add default config
Add default config, correct want and fix linter name.
1 parent 10fd3e0 commit 5d2af72

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/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

Lines changed: 2 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing 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
func TestSourcesFromTestdataSubDir(t *testing.T) {
3131
subDirs := []string{
3232
"loggercheck",
33+
"uncalled",
3334
}
3435

3536
for _, dir := range subDirs {

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
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy