thiagofm/memcached-manager

View on GitHub

Showing 168 of 168 total issues

Function draw_line has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function draw_line(string, options) {
            // prevent exception in display exception
            try {
                var line_settings = $.extend({
                    raw: false,
Severity: Minor
Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

    Function focus has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    focus: function(toggle, silent) {
                        self.oneTime(1, function() {
                            if (terminals.length() === 1) {
                                if (toggle === false) {
                                    try {
    Severity: Minor
    Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                      if (reverse_search && (e.which === 35 || e.which === 36 ||
                                             e.which === 37 || e.which === 38 ||
                                             e.which === 39 || e.which === 40 ||
                                             e.which === 13 || e.which === 27)) {
                          clear_reverse_state();
      Severity: Critical
      Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

        Function remove has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    remove: function(element, label, fn) {
                        var timers = element.$timers, ret;
        
                        if (timers) {
        
        
        Severity: Minor
        Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

          Function show has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  show:function () {
          
                      var self = this;
          
                      $(self.options.layout.container.selector).append(self.$bar);
          Severity: Minor
          Found in lib/public/javascripts/noty/jquery.noty.js - About 1 hr to fix

            Function flush has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            flush: function() {
                                try {
                                    var wrapper;
                                    // print all lines
                                    $.each(output_buffer, function(i, line) {
            Severity: Minor
            Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

              Function make_object_interpreter has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function make_object_interpreter(object, arity, fallback) {
                          // function that maps commands to object methods
                          // it keeps terminal context
                          return function(user_command, terminal) {
                              if (user_command === '') {
              Severity: Minor
              Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

                Function make_json_rpc_object has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function make_json_rpc_object(url, auth, success) {
                            $.jrpc(url, 'system.describe', [], function(ret) {
                                var commands = [];
                                if (ret.procs) {
                                    var interpreter_object = {};
                Severity: Minor
                Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

                  Function Cycle has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function Cycle(init) {
                          var data = init ? [init] : [];
                          var pos = 0;
                          $.extend(this, {
                              get: function() {
                  Severity: Minor
                  Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

                    Function recur has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    (function recur(interpreters, success) {
                                        if (interpreters.length) {
                                            var first = interpreters[0];
                                            var rest = interpreters.slice(1);
                                            var type = $.type(first);
                    Severity: Minor
                    Found in lib/public/javascripts/jquery-terminal.js - About 1 hr to fix

                      Function complete_helper has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function complete_helper(command, string, commands) {
                                  var test = command_line.get().substring(0, command_line.position());
                                  if (test !== command) {
                                      // command line changed between TABS - ignore
                                      return;
                      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

                            $.noty.setType = function (id, type) {
                                return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
                            };
                        Severity: Major
                        Found in lib/public/javascripts/noty/jquery.noty.js and 1 other location - About 1 hr to fix
                        lib/public/javascripts/noty/jquery.noty.js on lines 370..372

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

                        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

                          $stateProvider
                            .state('showKeys', {
                              url: "",
                              views: {
                                "keys": {
                        Severity: Major
                        Found in lib/public/javascripts/angular/routes.js and 2 other locations - About 1 hr to fix
                        lib/public/javascripts/angular/routes.js on lines 2..28
                        lib/public/javascripts/angular/routes.js on lines 2..41

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

                        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

                                                    } else {
                                                        try {
                                                            if (!silent && settings.onFocus(self) !== false) {
                                                                self.enable();
                                                            }
                        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 3642..3651

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

                        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 (toggle === false) {
                                                        try {
                                                            if (!silent && settings.onBlur(self) !== false) {
                                                                self.disable();
                                                            }
                        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 3651..3660

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

                        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 jrpc has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            $.jrpc = function(url, method, params, success, error) {
                                ids[url] = ids[url] || 0;
                                var request = $.json_stringify({
                                   'jsonrpc': '2.0', 'method': method,
                                    'params': params, 'id': ++ids[url]});
                        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

                              $.noty.setText = function (id, text) {
                                  return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
                              };
                          Severity: Major
                          Found in lib/public/javascripts/noty/jquery.noty.js and 1 other location - About 1 hr to fix
                          lib/public/javascripts/noty/jquery.noty.js on lines 374..376

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

                          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 pop has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          pop: function(string) {
                                              if (string !== undefined) {
                                                  echo_command(string);
                                              }
                                              var token = self.token(true);
                          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

                                            case 'topCenter': case 'center': case 'bottomCenter': case 'inline':
                                                this.$bar.css({
                                                    borderRadius: '5px',
                                                    border: '1px solid #eee',
                                                    boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
                            Severity: Major
                            Found in lib/public/javascripts/noty/themes/default.js and 1 other location - About 1 hr to fix
                            lib/public/javascripts/noty/themes/default.js on lines 105..112

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

                            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 'centerLeft': case 'centerRight':
                                                this.$bar.css({
                                                    borderRadius: '5px',
                                                    border: '1px solid #eee',
                                                    boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
                            Severity: Major
                            Found in lib/public/javascripts/noty/themes/default.js and 1 other location - About 1 hr to fix
                            lib/public/javascripts/noty/themes/default.js on lines 95..102

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

                            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