thiagofm/memcached-manager

View on GitHub

Showing 168 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

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

            en: {
              year: function(c) { return "year" + ((c !== 1) ? "s" : ""); },
              month: function(c) { return "month" + ((c !== 1) ? "s" : ""); },
              week: function(c) { return "week" + ((c !== 1) ? "s" : ""); },
              day: function(c) { return "day" + ((c !== 1) ? "s" : ""); },
        Severity: Major
        Found in lib/public/javascripts/humanize_duration.js and 3 other locations - About 1 day to fix
        lib/public/javascripts/humanize_duration.js on lines 17..26
        lib/public/javascripts/humanize_duration.js on lines 37..46
        lib/public/javascripts/humanize_duration.js on lines 67..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 230.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

            es: {
              year: function(c) { return "año" + ((c !== 1) ? "s" : ""); },
              month: function(c) { return "mes" + ((c !== 1) ? "es" : ""); },
              week: function(c) { return "semana" + ((c !== 1) ? "s" : ""); },
              day: function(c) { return "día" + ((c !== 1) ? "s" : ""); },
        Severity: Major
        Found in lib/public/javascripts/humanize_duration.js and 3 other locations - About 1 day to fix
        lib/public/javascripts/humanize_duration.js on lines 17..26
        lib/public/javascripts/humanize_duration.js on lines 37..46
        lib/public/javascripts/humanize_duration.js on lines 47..56

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 230.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

            ca: {
              year: function(c) { return "any" + ((c !== 1) ? "s" : ""); },
              month: function(c) { return "mes" + ((c !== 1) ? "os" : ""); },
              week: function(c) { return "setman" + ((c !== 1) ? "es" :"a"); },
              day: function(c) { return "di" + ((c !== 1) ? "es" :"a"); },
        Severity: Major
        Found in lib/public/javascripts/humanize_duration.js and 3 other locations - About 1 day to fix
        lib/public/javascripts/humanize_duration.js on lines 37..46
        lib/public/javascripts/humanize_duration.js on lines 47..56
        lib/public/javascripts/humanize_duration.js on lines 67..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 230.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

            de: {
              year: function(c) { return "jahr" + ((c !== 1) ? "e" : ""); },
              month: function(c) { return "monat" + ((c !== 1) ? "e" : ""); },
              week: function(c) { return "woche" + ((c !== 1) ? "n" : ""); },
              day: function(c) { return "tag" + ((c !== 1) ? "e" : ""); },
        Severity: Major
        Found in lib/public/javascripts/humanize_duration.js and 3 other locations - About 1 day to fix
        lib/public/javascripts/humanize_duration.js on lines 17..26
        lib/public/javascripts/humanize_duration.js on lines 47..56
        lib/public/javascripts/humanize_duration.js on lines 67..76

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 230.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              da: {
                year: "år",
                month: function(c) { return "måned" + ((c !== 1) ? "er" : ""); },
                week: function(c) { return "uge" + ((c !== 1) ? "r" : ""); },
                day: function(c) { return "dag" + ((c !== 1) ? "e" : ""); },
          Severity: Major
          Found in lib/public/javascripts/humanize_duration.js and 2 other locations - About 1 day to fix
          lib/public/javascripts/humanize_duration.js on lines 107..116
          lib/public/javascripts/humanize_duration.js on lines 147..156

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 207.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              sv: {
                year: "år",
                month: function(c) { return "månad" + ((c !== 1) ? "er" : ""); },
                week: function(c) { return "veck" + ((c !== 1) ? "or" : "a"); },
                day: function(c) { return "dag" + ((c !== 1) ? "ar" : ""); },
          Severity: Major
          Found in lib/public/javascripts/humanize_duration.js and 2 other locations - About 1 day to fix
          lib/public/javascripts/humanize_duration.js on lines 27..36
          lib/public/javascripts/humanize_duration.js on lines 107..116

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 207.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              nob: {
                year: "år",
                month: function(c) { return "måned" + ((c !== 1) ? "er" : ""); },
                week: function(c) { return "uke" + ((c !== 1) ? "r" : ""); },
                day: function(c) { return "dag" + ((c !== 1) ? "er" : ""); },
          Severity: Major
          Found in lib/public/javascripts/humanize_duration.js and 2 other locations - About 1 day to fix
          lib/public/javascripts/humanize_duration.js on lines 27..36
          lib/public/javascripts/humanize_duration.js on lines 147..156

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 207.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            controllers.controller('CreateKeyController', ['$scope', 'Keys', '$state', '$location', 'Notification', 'Response', function($scope, Keys, $state, $location, Notification, Response) {
              $scope.createKey = function() {
                pair = { key: $scope.pair.key, value: $scope.pair.value };
            
                $state.transitionTo('processingRequest');
            Severity: Major
            Found in lib/public/javascripts/angular/controllers.js and 1 other location - About 6 hrs to fix
            lib/public/javascripts/angular/controllers.js on lines 85..105

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 165.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            controllers.controller('UpdateKeyController', ['$state', '$scope', 'Key', 'Keys', '$location', 'Notification', 'Response', function($state, $scope, Key, Keys, $location, Notification, Response) {
              $scope.updateKey = function() {
                pair = { key: $scope.pair.key, value: $scope.pair.value };
            
                $state.transitionTo('processingRequest');
            Severity: Major
            Found in lib/public/javascripts/angular/controllers.js and 1 other location - About 6 hrs to fix
            lib/public/javascripts/angular/controllers.js on lines 43..63

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 165.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            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
                        Severity
                        Category
                        Status
                        Source
                        Language