thiagofm/memcached-manager

View on GitHub

Showing 110 of 168 total issues

Function doHumanization has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function doHumanization(ms, options) {

    // Make sure we have a positive number.
    // Has the nice sideffect of turning Number objects into primitives.
    ms = Math.abs(ms);
Severity: Minor
Found in lib/public/javascripts/humanize_duration.js - About 1 hr to fix

    Function make_basic_json_rpc_interpreter has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function make_basic_json_rpc_interpreter(url) {
                var service = function(method, params) {
                    self.pause();
                    $.jrpc(url, method, params, function(json) {
                        if (!json.error) {
    Severity: Minor
    Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

      Function parseArguments has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              parseArguments: function(string) {
                  return $.map(string.match(command_re) || [], function(arg) {
                      if (arg[0] === "'" && arg[arg.length-1] === "'") {
                          return arg.replace(/^'|'$/g, '');
                      } else if (arg[0] === '"' && arg[arg.length-1] === '"') {
      Severity: Minor
      Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

        Function exception has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        exception: function(e, label) {
                            var message = exception_message(e);
                            if (label) {
                                message = '[' + label + ']: ' + message;
                            }
        Severity: Minor
        Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

          Function push has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          push: function(interpreter, options) {
                              options = options || {};
                              options.name = options.name || prev_command;
                              options.prompt = options.prompt || options.name + ' ';
                              //names.push(options.name);
          Severity: Minor
          Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

            Function reverse_history_search has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function reverse_history_search(next) {
                        var history_data = history.data();
                        var regex, save_string;
                        var len = history_data.length;
                        if (next && reverse_search_position > 0) {
            Severity: Minor
            Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                      if (this.length > 1) {
                          return this.each(function() {
                              $.fn.terminal.call($(this),
                                                 init_interpreter,
                                                 $.extend({name: self.selector}, options));
              Severity: Major
              Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

                Function intword has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  humanize.intword = function(number, units, kilo, decimals, decPoint, thousandsSep, suffixSep) {
                Severity: Major
                Found in lib/public/javascripts/humanize.js - About 50 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (reverse_search_string.length !== j) {
                                                  reverse_search_string = reverse_search_string.substring(0, j);
                                                  draw_reverse_prompt();
                                              }
                  Severity: Major
                  Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (rpc_count === 1) {
                                                        function_interpreter = make_basic_json_rpc_interpreter(first);
                                                    } else {
                                                        self.error(strings.oneRPCWithIgnore);
                                                    }
                    Severity: Major
                    Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if (result !== false) {
                                                          self.echo(result);
                                                      }
                      Severity: Major
                      Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if (function_interpreter) {
                                                        self.error(strings.oneInterpreterFunction);
                                                    } else {
                                                        function_interpreter = first;
                                                    }
                        Severity: Major
                        Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                          if (match[1] != '0') {
                                                              inside = true;
                                                              output.push('[[' + code.join(';') + ']');
                                                              // store colors to next use
                                                              if (code[1]) {
                          Severity: Major
                          Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if (4 !== r.readyState) {
                                                        try {
                                                            r.abort();
                                                        } catch (error) {
                                                            self.error(strings.ajaxAbortError);
                            Severity: Major
                            Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if (interpreters.size() > 1 ||
                                                              settings.login !== undefined) {
                                                              self.pop('');
                                                          } else {
                                                              self.resume();
                              Severity: Major
                              Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                    if (style.indexOf('g') !== -1) {
                                                                        style_str += 'text-shadow:0 0 5px ' + color + ';';
                                                                    }
                                Severity: Major
                                Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if (match[1] == '0') {
                                                                      //just closing
                                                                      inside = false;
                                                                      prev_color = prev_background = '';
                                                                  } else {
                                  Severity: Major
                                  Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                for (var _fn in timers[label]) {
                                                                    if (timers[label].hasOwnProperty(_fn)) {
                                                                        window.clearInterval(timers[label][_fn]);
                                                                        delete timers[label][_fn];
                                                                    }
                                    Severity: Major
                                    Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (timers[label].hasOwnProperty(ret)) {
                                                                      break;
                                                                  }
                                      Severity: Major
                                      Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if (!arg.hasOwnProperty(match[2][k])) {
                                                                    throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
                                                                }
                                        Severity: Major
                                        Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language