NodeRedis/node-redis

View on GitHub

Showing 81 of 753 total issues

Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    sourceKey: string,
    destinationKey: string,
    aggregationType: TimeSeriesAggregationType,
    bucketDuration: number,
    alignTimestamp?: number
Severity: Minor
Found in packages/time-series/lib/commands/CREATERULE.ts - About 35 mins to fix

    Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    export function transformArguments(key: string, path: string, json: RedisJSON, start?: number, stop?: number): Array<string> {
    Severity: Minor
    Found in packages/json/lib/commands/ARRINDEX.ts - About 35 mins to fix

      Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          key: RedisCommandArgument,
          coordinates: GeoCoordinates,
          radius: number,
          unit: GeoUnits,
          options?: GeoSearchOptions
      Severity: Minor
      Found in packages/client/lib/commands/GEORADIUS.ts - About 35 mins to fix

        Function pushQueryArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            args: RedisCommandArguments,
            graph: RedisCommandArgument,
            query: RedisCommandArgument,
            options?: QueryOptionsBackwardCompatible,
            compact?: boolean
        Severity: Minor
        Found in packages/graph/lib/commands/index.ts - About 35 mins to fix

          Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              dst: RedisCommandArgument,
              src: RedisCommandArgument,
              min: RedisCommandArgument | number,
              max: RedisCommandArgument | number,
              options?: ZRangeStoreOptions
          Severity: Minor
          Found in packages/client/lib/commands/ZRANGESTORE.ts - About 35 mins to fix

            Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                key: RedisCommandArgument,
                coordinates: GeoCoordinates,
                radius: number,
                unit: GeoUnits,
                options?: GeoSearchOptions
            Severity: Minor
            Found in packages/client/lib/commands/GEORADIUS_RO.ts - About 35 mins to fix

              Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  key: RedisCommandArgument,
                  member: string,
                  radius: number,
                  unit: GeoUnits,
                  options?: GeoSearchOptions
              Severity: Minor
              Found in packages/client/lib/commands/GEORADIUSBYMEMBER.ts - About 35 mins to fix

                Function pushMRangeArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    args: RedisCommandArguments,
                    fromTimestamp: Timestamp,
                    toTimestamp: Timestamp,
                    filter: Filter,
                    options?: MRangeOptions
                Severity: Minor
                Found in packages/time-series/lib/commands/index.ts - About 35 mins to fix

                  Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      key: RedisCommandArgument,
                      from: GeoSearchFrom,
                      by: GeoSearchBy,
                      replyWith: Array<GeoReplyWith>,
                      options?: GeoSearchOptions
                  Severity: Minor
                  Found in packages/client/lib/commands/GEOSEARCH_WITH.ts - About 35 mins to fix

                    Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        source: RedisCommandArgument,
                        destination: RedisCommandArgument,
                        sourceDirection: ListSide,
                        destinationDirection: ListSide,
                        timeout: number
                    Severity: Minor
                    Found in packages/client/lib/commands/BLMOVE.ts - About 35 mins to fix

                      Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          key: RedisCommandArgument,
                          bit: BitValue,
                          start?: number,
                          end?: number,
                          mode?: 'BYTE' | 'BIT'
                      Severity: Minor
                      Found in packages/client/lib/commands/BITPOS.ts - About 35 mins to fix

                        Function pushGeoSearchArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            args: RedisCommandArguments,
                            key: RedisCommandArgument,
                            from: GeoSearchFrom,
                            by: GeoSearchBy,
                            options?: GeoSearchOptions
                        Severity: Minor
                        Found in packages/client/lib/commands/generic-transformers.ts - About 35 mins to fix

                          Function pushMRangeWithLabelsArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              args: RedisCommandArguments,
                              fromTimestamp: Timestamp,
                              toTimestamp: Timestamp,
                              filter: Filter,
                              options?: MRangeWithLabelsOptions
                          Severity: Minor
                          Found in packages/time-series/lib/commands/index.ts - About 35 mins to fix

                            Function transformArguments has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                key: RedisCommandArgument,
                                member: string,
                                radius: number,
                                unit: GeoUnits,
                                options?: GeoSearchOptions
                            Severity: Minor
                            Found in packages/client/lib/commands/GEORADIUSBYMEMBER_RO.ts - About 35 mins to fix

                              Function pushQueryArguments has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function pushQueryArguments(
                                  args: RedisCommandArguments,
                                  graph: RedisCommandArgument,
                                  query: RedisCommandArgument,
                                  options?: QueryOptionsBackwardCompatible,
                              Severity: Minor
                              Found in packages/graph/lib/commands/index.ts - About 35 mins 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

                              Function transformReply has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function transformReply(rawReply: string): ClientInfoReply {
                                  const map: Record<string, string> = {};
                                  for (const item of rawReply.matchAll(CLIENT_INFO_REGEX)) {
                                      map[item[1]] = item[2];
                                  }
                              Severity: Minor
                              Found in packages/client/lib/commands/CLIENT_INFO.ts - About 25 mins 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

                              Function transformArguments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function transformArguments(dest: string, src: Sketches): Array<string> {
                                  const args = [
                                      'CMS.MERGE',
                                      dest,
                                      src.length.toString()
                              Severity: Minor
                              Found in packages/bloom/lib/commands/count-min-sketch/MERGE.ts - About 25 mins 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

                              Function transformArguments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function transformArguments(
                                  key: RedisCommandArgument,
                                  group: RedisCommandArgument,
                                  consumer: RedisCommandArgument,
                                  minIdleTime: number,
                              Severity: Minor
                              Found in packages/client/lib/commands/XCLAIM.ts - About 25 mins 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

                              Function transformArguments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function transformArguments(
                                  key: RedisCommandArgument, toAdd: GeoMember | Array<GeoMember>,
                                  options?: GeoAddOptions
                              ): RedisCommandArguments {
                                  const args = ['GEOADD', key];
                              Severity: Minor
                              Found in packages/client/lib/commands/GEOADD.ts - About 25 mins 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

                              Function documentValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function documentValue(tuples: any) {
                                  const message = Object.create(null);
                              
                                  let i = 0;
                                  while (i < tuples.length) {
                              Severity: Minor
                              Found in packages/search/lib/commands/SEARCH.ts - About 25 mins 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

                              Severity
                              Category
                              Status
                              Source
                              Language