thiagofm/memcached-manager

View on GitHub

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

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

                            if (_8bit_color && process_8bit && palette[num-1]) {
                                output_color = palette[num-1];
                            } else if (color[num]) {
                                output_color = color[num];
                            }
    Severity: Major
    Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
    lib/public/javascripts/jquery-terminal.js on lines 2097..2101

    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 61.

    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

                            if (_8bit_background && process_8bit && palette[num-1]) {
                                output_background = palette[num-1];
                            } else if (background[num]) {
                                output_background = background[num];
                            }
    Severity: Major
    Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
    lib/public/javascripts/jquery-terminal.js on lines 2092..2096

    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 61.

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

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

      controllers.controller('ShowKeyController', ['$state', '$scope', 'Key', '$location', '$stateParams', function($state, $scope, Key, $location, $stateParams) {
        // Set up the current form text 'key' as key
        $scope.pair = Key.find({key: $stateParams.key});
      }]);
      Severity: Major
      Found in lib/public/javascripts/angular/controllers.js and 1 other location - About 1 hr to fix
      lib/public/javascripts/angular/controllers.js on lines 107..110

      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 60.

      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('EditKeyController', ['$state', '$scope', 'Key', '$location', '$stateParams', function($state, $scope, Key, $location, $stateParams) {
        // Set up the current form text 'key' as key
        $scope.pair = Key.find({key: $stateParams.key});
      }]);
      Severity: Major
      Found in lib/public/javascripts/angular/controllers.js and 1 other location - About 1 hr to fix
      lib/public/javascripts/angular/controllers.js on lines 118..121

      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 60.

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

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

                            case 'success':
                                this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
                                this.$buttons.css({borderTop: '1px solid #50C24E'});break;
            Severity: Major
            Found in lib/public/javascripts/noty/themes/default.js and 2 other locations - About 1 hr to fix
            lib/public/javascripts/noty/themes/default.js on lines 133..135
            lib/public/javascripts/noty/themes/default.js on lines 140..142

            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 57.

            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

                            case 'information':
                                this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
                                this.$buttons.css({borderTop: '1px solid #0B90C4'}); break;
            Severity: Major
            Found in lib/public/javascripts/noty/themes/default.js and 2 other locations - About 1 hr to fix
            lib/public/javascripts/noty/themes/default.js on lines 133..135
            lib/public/javascripts/noty/themes/default.js on lines 143..145

            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 57.

            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

                            case 'warning':
                                this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
                                this.$buttons.css({borderTop: '1px solid #FFC237'}); break;
            Severity: Major
            Found in lib/public/javascripts/noty/themes/default.js and 2 other locations - About 1 hr to fix
            lib/public/javascripts/noty/themes/default.js on lines 140..142
            lib/public/javascripts/noty/themes/default.js on lines 143..145

            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 57.

            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

                        visible: (function() {
                            var visible = self.visible;
                            return function() {
                                visible.apply(self, []);
                                redraw();
            Severity: Major
            Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
            lib/public/javascripts/jquery-terminal.js on lines 1490..1497

            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 57.

            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

                        show: (function() {
                            var show = self.show;
                            return function() {
                                show.apply(self, []);
                                redraw();
            Severity: Major
            Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
            lib/public/javascripts/jquery-terminal.js on lines 1482..1489

            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 57.

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

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

                            var color = {
                                30: 'black',
                                31: 'red',
                                32: 'green',
                                33: 'yellow',
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
                lib/public/javascripts/jquery-terminal.js on lines 2036..2047

                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 55.

                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

                            var background = {
                                40: 'black',
                                41: 'red',
                                42: 'green',
                                43: 'yellow',
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 1 hr to fix
                lib/public/javascripts/jquery-terminal.js on lines 2024..2035

                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 55.

                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

                                        case 'top':
                                            $(selector).css({borderRadius: '0px 0px 0px 0px'});
                                            $(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
                Severity: Minor
                Found in lib/public/javascripts/noty/themes/default.js and 1 other location - About 55 mins to fix
                lib/public/javascripts/noty/themes/default.js on lines 19..21

                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 54.

                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

                                        case 'bottom':
                                            $(selector).css({borderRadius: '0px 0px 0px 0px'});
                                            $(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
                Severity: Minor
                Found in lib/public/javascripts/noty/themes/default.js and 1 other location - About 55 mins to fix
                lib/public/javascripts/noty/themes/default.js on lines 10..12

                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 54.

                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

                Severity
                Category
                Status
                Source
                Language