File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ linters-settings:
4040 - (*github.com/peterstace/simplefeatures/rtree.RTree).RangeSearch
4141 - (*github.com/peterstace/simplefeatures/rtree.RTree).PrioritySearch
4242
43- # NOTE: every linter supported by golangci-lint is either explicitly included
44- # or excluded.
43+ # NOTE: every linter supported by golangci-lint is either explicitly enabled
44+ # or disabled. When adding or removing a linter, move it between the two
45+ # sections rather than just deleting it.
4546linters :
4647
4748 enable :
@@ -81,7 +82,6 @@ linters:
8182 - importas
8283 - ineffassign
8384 - intrange
84- - ireturn
8585 - loggercheck
8686 - makezero
8787 - mirror
@@ -145,6 +145,7 @@ linters:
145145 - gomnd
146146 - inamedparam
147147 - interfacebloat
148+ - ireturn
148149 - lll
149150 - maintidx
150151 - nestif
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ func arbitraryControlPoint(g Geometry) Point {
141141 }
142142}
143143
144- func catch [T any ](fn func () (T , error )) (result T , err error ) { //nolint:ireturn
144+ func catch [T any ](fn func () (T , error )) (result T , err error ) {
145145 // In Go 1.21+, panic(nil) causes recover() to return a *runtime.PanicNilError
146146 // rather than nil. In earlier versions, recover() returns nil for panic(nil),
147147 // making it indistinguishable from "no panic". We emulate the Go 1.21+ behavior
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type Polymorphic interface {
1212
1313// GetLeaf walks the child chain to find the leaf (concrete) type. This is used
1414// by dispatchers to find the most-derived implementation of a method.
15- func GetLeaf (obj Polymorphic ) Polymorphic { //nolint:ireturn
15+ func GetLeaf (obj Polymorphic ) Polymorphic {
1616 for {
1717 child := obj .GetChild ()
1818 if child == nil {
@@ -77,7 +77,7 @@ func InstanceOf[T any](obj Polymorphic) bool {
7777//
7878// Panics with a descriptive message if obj cannot be cast to T (equivalent to
7979// Java's ClassCastException).
80- func Cast [T Polymorphic ](obj Polymorphic ) T { //nolint:ireturn
80+ func Cast [T Polymorphic ](obj Polymorphic ) T {
8181 var zero T
8282 if obj == nil {
8383 panic (fmt .Sprintf ("cannot cast nil to %T" , zero ))
You can’t perform that action at this time.
0 commit comments