Showing 635 of 649 total issues
File gen_search.go
has 5454 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_timeseries.go
has 3878 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_geo.go
has 2620 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_sorted_set.go
has 2033 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_generic.go
has 1556 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_server.go
has 1275 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File cluster.go
has 1199 lines of code (exceeds 500 allowed). Consider refactoring. Open
package rueidis
import (
"context"
"errors"
File gen_stream.go
has 1129 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_connection.go
has 1007 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
Function _newPipe
has a Cognitive Complexity of 100 (exceeds 20 allowed). Consider refactoring. Open
func _newPipe(connFn func() (net.Conn, error), option *ClientOption, r2ps, nobg bool) (p *pipe, err error) {
conn, err := connFn()
if err != nil {
return nil, err
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File gen_json.go
has 948 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
File gen_string.go
has 916 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import (
File gen_list.go
has 906 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
Method clusterClient._refresh
has a Cognitive Complexity of 77 (exceeds 20 allowed). Consider refactoring. Open
func (c *clusterClient) _refresh() (err error) {
c.mu.RLock()
results := make(chan clusterslots, len(c.conns))
pending := make([]conn, 0, len(c.conns))
if c.aws {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Builder
has 66 methods (exceeds 20 allowed). Consider refactoring. Open
func (b Builder) AclCat() (c AclCat) {
c = AclCat{cs: get(), ks: b.ks}
c.cs.s = append(c.cs.s, "ACL", "CAT")
return c
}
Method locker.try
has a Cognitive Complexity of 68 (exceeds 20 allowed). Consider refactoring. Open
func (m *locker) try(ctx context.Context, cancel context.CancelFunc, name string, g *gate) context.CancelFunc {
var err error
val := random()
deadline := time.Now().Add(m.validity)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File gen_scripting.go
has 744 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"
Function _newPipe
has 182 lines of code (exceeds 50 allowed). Consider refactoring. Open
func _newPipe(connFn func() (net.Conn, error), option *ClientOption, r2ps, nobg bool) (p *pipe, err error) {
conn, err := connFn()
if err != nil {
return nil, err
}
Method lru.Flights
has a Cognitive Complexity of 50 (exceeds 20 allowed). Consider refactoring. Open
func (c *lru) Flights(now time.Time, multi []CacheableTTL, results []RedisResult, entries map[int]CacheEntry) (missed []int) {
var moves []*list.Element
c.mu.RLock()
for i, ct := range multi {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File gen_set.go
has 627 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated DO NOT EDIT
package cmds
import "strconv"