thiagofm/memcached-manager

View on GitHub

Showing 110 of 168 total issues

File jquery-terminal.js has 3622 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**@license
 *       __ _____                     ________                              __
 *      / // _  /__ __ _____ ___ __ _/__  ___/__ ___ ______ __ __  __ ___  / /
 *  __ / // // // // // _  // _// // / / // _  // _//     // //  \/ // _ \/ /
 * /  / // // // // // ___// / / // / / // ___// / / / / // // /\  // // / /__
Severity: Major
Found in lib/public/javascripts/jquery-terminal.js - About 1 wk to fix

    Function terminal has 1464 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.terminal = function(init_interpreter, options) {
            // -----------------------------------------------------------------------
            // :: helper function
            // -----------------------------------------------------------------------
            function get_processed_command(command) {
    Severity: Major
    Found in lib/public/javascripts/jquery-terminal.js - About 1 wk to fix

      Function cmd has 721 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.cmd = function(options) {
              var self = this;
              var maybe_data = self.data('cmd');
              if (maybe_data) {
                  return maybe_data;
      Severity: Major
      Found in lib/public/javascripts/jquery-terminal.js - About 3 days to fix

        Function keydown_event has 242 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function keydown_event(e) {
                    var result, pos, len;
                    if (typeof options.keydown == 'function') {
                        result = options.keydown(e);
                        if (result !== undefined) {
        Severity: Major
        Found in lib/public/javascripts/jquery-terminal.js - About 1 day to fix

          Function from_ansi has 164 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  from_ansi: (function() {
                      var color = {
                          30: 'black',
                          31: 'red',
                          32: 'green',
          Severity: Major
          Found in lib/public/javascripts/jquery-terminal.js - About 6 hrs to fix

            Function redraw has 151 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var redraw = (function(self) {
                        var before = cursor.prev();
                        var after = cursor.next();
                        // -----------------------------------------------------------------------
                        // :: Draw line with the cursor
            Severity: Major
            Found in lib/public/javascripts/jquery-terminal.js - About 6 hrs to fix

              File jquery.noty.js has 401 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * noty - jQuery Notification Plugin v2.1.0
               * Contributors: https://github.com/needim/noty/graphs/contributors
               *
               * Examples and Documentation - http://needim.github.com/noty/
              Severity: Minor
              Found in lib/public/javascripts/noty/jquery.noty.js - About 5 hrs to fix

                Function key_down has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function key_down(e) {
                            // Prevent to be executed by cmd: CTRL+D, TAB, CTRL+TAB (if more then
                            // one terminal)
                            var result, i, top = interpreters.top();
                            if ($.type(top.keydown) === 'function') {
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js - About 4 hrs to fix

                  Function style has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          style: function() {
                  
                              this.$bar.css({
                                  overflow: 'hidden',
                                  background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAYAAAAPOoFWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNq81tsOgjAMANB2ov7/7ypaN7IlIwi9rGuT8QSc9EIDAsAznxvY4pXPKr05RUE5MEVB+TyWfCEl9LZApYopCmo9C4FKSMtYoI8Bwv79aQJU4l6hXXCZrQbokJEksxHo9KMOgc6w1atHXM8K9DVC7FQnJ0i8iK3QooGgbnyKgMDygBWyYFZoqx4qS27KqLZJjA1D0jK6QJcYEQEiWv9PGkTsbqxQ8oT+ZtZB6AkdsJnQDnMoHXHLGKOgDYuCWmYhEERCI5gaamW0bnHdA3k2ltlIN+2qKRyCND0bhqSYCyTB3CAOc4WusBEIpkeBuPgJMAAX8Hs1NfqHRgAAAABJRU5ErkJggg==') repeat-x scroll left top #fff"
                  Severity: Major
                  Found in lib/public/javascripts/noty/themes/default.js - About 3 hrs to fix

                    Function make_interpreter has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function make_interpreter(user_interpreter, auth, finalize) {
                                finalize = finalize || $.noop;
                                var type = $.type(user_interpreter);
                                var result = {};
                                var commands;
                    Severity: Major
                    Found in lib/public/javascripts/jquery-terminal.js - About 3 hrs to fix

                      Function format has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              format: function(str, options) {
                                  var settings = $.extend({}, {
                                      linksNoReferrer: false
                                  }, options || {});
                                  if (typeof str === 'string') {
                      Severity: Major
                      Found in lib/public/javascripts/jquery-terminal.js - About 3 hrs to fix

                        Function split_equal has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                split_equal: function(str, length) {
                                    var formatting = false;
                                    var in_text = false;
                                    var braket = 0;
                                    var prev_format = '';
                        Severity: Major
                        Found in lib/public/javascripts/jquery-terminal.js - About 3 hrs to fix

                          Function format_ansi has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      function format_ansi(code) {
                                          var controls = code.split(';');
                                          var num;
                                          var faited = false;
                                          var reverse = false;
                          Severity: Major
                          Found in lib/public/javascripts/jquery-terminal.js - About 3 hrs to fix

                            Function noty has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            window.noty = function noty(options) {
                            
                                // This is for BC  -  Will be deleted on v2.2.0
                                var using_old = 0
                                    , old_to_new = {
                            Severity: Major
                            Found in lib/public/javascripts/noty/jquery.noty.js - About 3 hrs to fix

                              Function noty has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                              window.noty = function noty(options) {
                              
                                  // This is for BC  -  Will be deleted on v2.2.0
                                  var using_old = 0
                                      , old_to_new = {
                              Severity: Minor
                              Found in lib/public/javascripts/noty/jquery.noty.js - About 3 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

                              Function date has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                humanize.date = function(format, timestamp) {
                                  var jsdate = ((timestamp === undefined) ? new Date() : // Not provided
                                                (timestamp instanceof Date) ? new Date(timestamp) : // JS Date()
                                                new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
                                               );
                              Severity: Major
                              Found in lib/public/javascripts/humanize.js - About 3 hrs to fix

                                Function History has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function History(name, size) {
                                        var enabled = true;
                                        var storage_key = '';
                                        if (typeof name === 'string' && name !== '') {
                                            storage_key = name + '_';
                                Severity: Major
                                Found in lib/public/javascripts/jquery-terminal.js - About 2 hrs to fix

                                  File humanize_duration.js has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  // HumanizeDuration.js - http://git.io/j0HgmQ
                                  
                                  (function() {
                                  
                                    var UNITS = {
                                  Severity: Minor
                                  Found in lib/public/javascripts/humanize_duration.js - About 2 hrs to fix

                                    Function login has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                                    login: function(auth, infinite, success, error) {
                                                        if (in_login) {
                                                            throw new Error(strings.notWhileLogin);
                                                        }
                                                        if (typeof auth !== 'function') {
                                    Severity: Major
                                    Found in lib/public/javascripts/jquery-terminal.js - About 2 hrs to fix

                                      Function json_stringify has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          $.json_stringify = function(object, level) {
                                              var result = '', i;
                                              level = level === undefined ? 1 : level;
                                              var type = typeof object;
                                              switch (type) {
                                      Severity: Major
                                      Found in lib/public/javascripts/jquery-terminal.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language