Skip to content

Commit 1559d37

Browse files
authored
chore: rename resultIndex to result-index (#5)
Rename resultIndex in config output to result-index to match the standard in golangci-lint.
1 parent 348eb59 commit 1559d37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/uncalled/.uncalled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ rules:
1414
pointer: false
1515
expect:
1616
method: .Err
17-
resultIndex: 0
17+
result-index: 0
1818
args: []

pkg/uncalled/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type Rule struct {
3232
types map[string]struct{}
3333
}
3434

35+
// expects returns the expected string based on ident.
3536
func (r Rule) expects(ident string) string {
3637
if ident == "" {
3738
ident = strings.TrimLeft(r.Call.Results[r.Expect.ResultIndex].Type, ".")
@@ -158,7 +159,7 @@ func (r Result) name(pkg string) string {
158159
// Expect is the expected call for a Rule.
159160
type Expect struct {
160161
Method string
161-
ResultIndex int `yaml:"resultIndex" mapstructure:"resultIndex"`
162+
ResultIndex int `yaml:"result-index" mapstructure:"result-index"`
162163
Args []string
163164
}
164165

0 commit comments

Comments
 (0)