Skip to content

Commit 85c646d

Browse files
committed
chore: Add the err113 linter
1 parent 3bfbb19 commit 85c646d

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ linters:
1414
- dupword
1515
- durationcheck
1616
- embeddedstructfieldcheck
17+
- err113
1718
- errcheck
1819
- errname
1920
- exhaustive

internal/datavalue/datavalue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func Errorf(e string, args ...any) Value {
222222
Bool: false,
223223
Func: nil,
224224
Values: nil,
225-
Error: fmt.Errorf(e, args...),
225+
Error: fmt.Errorf(e, args...), // nolint: err113
226226
Any: nil,
227227
}
228228
}

internal/errorutil/errorutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (e *Error) Error() string {
143143

144144
// Unwrap returns the error message without any additional information.
145145
func (e *Error) Unwrap() error {
146-
return errors.New(string(e.msg))
146+
return errors.New(string(e.msg)) // nolint: err113
147147
}
148148

149149
// Position gets the position of the error.

internal/stdlib/errors/new.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func getNewFunction() function.Info {
3838
func(_ function.EvaluatorInterface, args []datavalue.Value) datavalue.Value {
3939
message, _ := args[0].AsString()
4040

41-
return datavalue.Error(errors.New(message))
41+
return datavalue.Error(errors.New(message)) // nolint: err113
4242
},
4343
)
4444
}

0 commit comments

Comments
 (0)