thiagofm/memcached-manager

View on GitHub

Showing 168 of 168 total issues

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

                self.$bar.delay(self.options.timeout).promise().done(function () {
                    self.close();
                });
Severity: Minor
Found in lib/public/javascripts/noty/jquery.noty.js and 1 other location - About 55 mins to fix
lib/public/javascripts/noty/jquery.noty.js on lines 242..244

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

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

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

                self.$bar.delay(self.options.timeout).promise().done(function () {
                    self.close();
                });
Severity: Minor
Found in lib/public/javascripts/noty/jquery.noty.js and 1 other location - About 55 mins to fix
lib/public/javascripts/noty/jquery.noty.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 53.

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 ($.type(top.keydown) === 'function') {
                result = top.keydown(e, self);
                if (result !== undefined) {
                    return result;
                }
Severity: Minor
Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 55 mins to fix
lib/public/javascripts/jquery-terminal.js on lines 3232..3237

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

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 ($.type(settings.keydown) === 'function') {
                result = settings.keydown(e, self);
                if (result !== undefined) {
                    return result;
                }
Severity: Minor
Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 55 mins to fix
lib/public/javascripts/jquery-terminal.js on lines 3215..3220

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

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

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

        if (options.hasOwnProperty('closeOnSelfOver')) {
            using_old++;
            if (options.closeOnSelfOver) options.closeWith.push('hover');
            delete options.closeOnSelfOver;
        }
    Severity: Major
    Found in lib/public/javascripts/noty/jquery.noty.js and 2 other locations - About 50 mins to fix
    lib/public/javascripts/noty/jquery.noty.js on lines 481..485
    lib/public/javascripts/noty/jquery.noty.js on lines 487..491

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

    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

        if (options.hasOwnProperty('closeButton')) {
            using_old++;
            if (options.closeButton) options.closeWith.push('button');
            delete options.closeButton;
        }
    Severity: Major
    Found in lib/public/javascripts/noty/jquery.noty.js and 2 other locations - About 50 mins to fix
    lib/public/javascripts/noty/jquery.noty.js on lines 487..491
    lib/public/javascripts/noty/jquery.noty.js on lines 493..497

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

    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

        if (options.hasOwnProperty('closeOnSelfClick')) {
            using_old++;
            if (options.closeOnSelfClick) options.closeWith.push('click');
            delete options.closeOnSelfClick;
        }
    Severity: Major
    Found in lib/public/javascripts/noty/jquery.noty.js and 2 other locations - About 50 mins to fix
    lib/public/javascripts/noty/jquery.noty.js on lines 481..485
    lib/public/javascripts/noty/jquery.noty.js on lines 493..497

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

    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

    services.factory('Connection', ['$resource', function($resource) {
      return $resource(window.basePath + '/api/status.json', {}, {
        'get':   { method: 'GET' },
      });
    }]);
    Severity: Minor
    Found in lib/public/javascripts/angular/services/resources.js and 1 other location - About 50 mins to fix
    lib/public/javascripts/angular/services/resources.js on lines 16..20

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

    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

    services.factory('Stats', ['$resource', function($resource) {
      return $resource(window.basePath + '/api/stats.json', {}, {
        'all':   { method: 'GET' }
      });
    }]);
    Severity: Minor
    Found in lib/public/javascripts/angular/services/resources.js and 1 other location - About 50 mins to fix
    lib/public/javascripts/angular/services/resources.js on lines 29..33

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

    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

    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

                              if (line[j] === '&') { // treat entity as one character
                                  var m = line.substring(j).match(/^(&[^;]+;)/);
                                  if (!m) {
                                      // should never happen if used by terminal, because
                                      // it always calls $.terminal.encode before this function
      Severity: Major
      Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if (last[last.length-1] !== ']') {
                                        prev_format = last.match(format_begin_re)[1];
                                        output_line += ']';
                                    } else if (output_line.match(format_last_re)) {
                                        var line_len = output_line.length;
        Severity: Major
        Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (terminals.length() > 1) {
                                  self.focus(false);
                                  return false;
                              }
          Severity: Major
          Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if (arguments[i] === undef) {
                                                    match[i] = undef;
                                                }
            Severity: Major
            Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              } else if (e.which === 8) { //backspace
                                  if (reverse_search) {
                                      reverse_search_string = reverse_search_string.slice(0, -1);
                                      draw_reverse_prompt();
                                  } else {
              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

                  Function filesize has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    humanize.filesize = function(filesize, kilo, decimals, decPoint, thousandsSep, suffixSep) {
                  Severity: Minor
                  Found in lib/public/javascripts/humanize.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

                                      } else if (e.which === 34) { // PAGE DOWN
                                          self.scroll(self.height());
                                      } else if (e.which === 33) { // PAGE UP
                                          self.scroll(-self.height());
                                      } else {
                      Severity: Major
                      Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language