NodeRedis/redis-commands

View on GitHub

Showing 6 of 6 total issues

Function getKeyIndexes has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
Open

exports.getKeyIndexes = function (commandName, args, options) {
var command = commands[commandName]
if (!command) {
throw new Error('Unknown command ' + commandName)
}
Severity: Minor
Found in index.js - About 1 day to fix

Function getKeyIndexes has 86 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.getKeyIndexes = function (commandName, args, options) {
var command = commands[commandName]
if (!command) {
throw new Error('Unknown command ' + commandName)
}
Severity: Major
Found in index.js - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

    if (parseExternalKey) {
    keys.push([i, getExternalKeyNameLength(args[i])])
    } else {
    keys.push(i)
    }
    Severity: Major
    Found in index.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

      for (var j = i + 1; j < args.length; j++) {
      keys.push(j)
      }
      Severity: Major
      Found in index.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

        if (parseExternalKey) {
        keys.push([i, getExternalKeyNameLength(args[i])])
        } else {
        keys.push(i)
        }
        Severity: Major
        Found in index.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

          } else if (directive === 'STORE') {
          i += 1
          keys.push(i)
          }
          Severity: Major
          Found in index.js - About 45 mins to fix
            Severity
            Category
            Status
            Source
            Language