rueian/rueidis

View on GitHub

Showing 130 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"
Severity: Major
Found in internal/cmds/gen_search.go - About 2 wks to fix

    File gen_timeseries.go has 3878 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    // Code generated DO NOT EDIT
    
    package cmds
    
    import "strconv"
    Severity: Major
    Found in internal/cmds/gen_timeseries.go - About 1 wk to fix

      File gen_geo.go has 2620 lines of code (exceeds 500 allowed). Consider refactoring.
      Open

      // Code generated DO NOT EDIT
      
      package cmds
      
      import "strconv"
      Severity: Major
      Found in internal/cmds/gen_geo.go - About 6 days to fix

        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"
        Severity: Major
        Found in internal/cmds/gen_sorted_set.go - About 4 days to fix

          File gen_generic.go has 1556 lines of code (exceeds 500 allowed). Consider refactoring.
          Open

          // Code generated DO NOT EDIT
          
          package cmds
          
          import "strconv"
          Severity: Major
          Found in internal/cmds/gen_generic.go - About 3 days to fix

            File gen_server.go has 1275 lines of code (exceeds 500 allowed). Consider refactoring.
            Open

            // Code generated DO NOT EDIT
            
            package cmds
            
            import "strconv"
            Severity: Major
            Found in internal/cmds/gen_server.go - About 2 days to fix

              File cluster.go has 1199 lines of code (exceeds 500 allowed). Consider refactoring.
              Open

              package rueidis
              
              import (
                  "context"
                  "errors"
              Severity: Major
              Found in cluster.go - About 2 days to fix

                File gen_stream.go has 1129 lines of code (exceeds 500 allowed). Consider refactoring.
                Open

                // Code generated DO NOT EDIT
                
                package cmds
                
                import "strconv"
                Severity: Major
                Found in internal/cmds/gen_stream.go - About 2 days to fix

                  File gen_connection.go has 1007 lines of code (exceeds 500 allowed). Consider refactoring.
                  Open

                  // Code generated DO NOT EDIT
                  
                  package cmds
                  
                  import "strconv"
                  Severity: Major
                  Found in internal/cmds/gen_connection.go - About 1 day to fix

                    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
                        }
                    Severity: Minor
                    Found in pipe.go - About 1 day to fix

                    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"
                    Severity: Major
                    Found in internal/cmds/gen_json.go - About 1 day to fix

                      File gen_string.go has 916 lines of code (exceeds 500 allowed). Consider refactoring.
                      Open

                      // Code generated DO NOT EDIT
                      
                      package cmds
                      
                      import (
                      Severity: Major
                      Found in internal/cmds/gen_string.go - About 1 day to fix

                        File gen_list.go has 906 lines of code (exceeds 500 allowed). Consider refactoring.
                        Open

                        // Code generated DO NOT EDIT
                        
                        package cmds
                        
                        import "strconv"
                        Severity: Major
                        Found in internal/cmds/gen_list.go - About 1 day to fix

                          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 {
                          Severity: Minor
                          Found in cluster.go - About 1 day to fix

                          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
                          }
                          Severity: Major
                          Found in internal/cmds/gen_server.go - About 1 day to fix

                            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)
                            Severity: Minor
                            Found in rueidislock/lock.go - About 1 day to fix

                            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"
                            Severity: Minor
                            Found in internal/cmds/gen_scripting.go - About 7 hrs to fix

                              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
                                  }
                              Severity: Major
                              Found in pipe.go - About 6 hrs to fix

                                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 {
                                Severity: Minor
                                Found in lru.go - About 5 hrs to fix

                                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"
                                Severity: Minor
                                Found in internal/cmds/gen_set.go - About 5 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language