thiagofm/memcached-manager

View on GitHub

Showing 168 of 168 total issues

Avoid deeply nested control flow statements.
Open

                            if (reverse_search_string.length !== j) {
                                reverse_search_string = reverse_search_string.substring(0, j);
                                draw_reverse_prompt();
                            }
Severity: Major
Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if (result === false) {
                                        lines = lines.slice(0, position).
                                            concat(lines.slice(position+1));
                                    } else {
                                        lines = lines.slice(0, position).
    Severity: Major
    Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                  if (matched[0].charAt(j) !== matched[i].charAt(j)) {
                                      break loop;
                                  }
      Severity: Major
      Found in lib/public/javascripts/jquery-terminal.js - About 45 mins to fix

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

                        token: settings.login ? function(local) {
                            return $.Storage.get(self.prefix_name(local) + '_token');
                        } : $.noop,
        Severity: Minor
        Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 40 mins to fix
        lib/public/javascripts/jquery-terminal.js on lines 3997..3999

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

        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

                        login_name: settings.login ? function(local) {
                            return $.Storage.get(self.prefix_name(local) + '_login');
                        } : $.noop,
        Severity: Minor
        Found in lib/public/javascripts/jquery-terminal.js and 1 other location - About 40 mins to fix
        lib/public/javascripts/jquery-terminal.js on lines 3991..3993

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

        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

        Consider simplifying this complex logical expression.
        Open

            } else if (c === 0 || (c >= 5 && c <= 20) || (c % 10 >= 5 && c % 10 <= 9) || (c % 10 === 0) ) {
              return 0;
            } else if (c === 1 || c % 10 === 1) {
              return 1;
            } else if (c > 1) {
        Severity: Major
        Found in lib/public/javascripts/humanize_duration.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                                  if (history && command && !mask &&
                                      ((typeof options.historyFilter == 'function' &&
                                        options.historyFilter(command)) ||
                                       !options.historyFilter)) {
                                      history.append(command);
          Severity: Major
          Found in lib/public/javascripts/jquery-terminal.js - About 40 mins to fix

            Function everyTime has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    everyTime: function(interval, label, fn, times, belay) {
            Severity: Minor
            Found in lib/public/javascripts/jquery-terminal.js - About 35 mins to fix

              Function jrpc has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  $.jrpc = function(url, method, params, success, error) {
              Severity: Minor
              Found in lib/public/javascripts/jquery-terminal.js - About 35 mins to fix

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

                    return sign + number + (tens > 4 && tens < 21 ? 'th' : {1: 'st', 2: 'nd', 3: 'rd'}[number % 10] || 'th');
                Severity: Minor
                Found in lib/public/javascripts/humanize.js and 1 other location - About 35 mins to fix
                lib/public/javascripts/humanize.js on lines 106..106

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

                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

                        return j > 4 && j < 21 ? 'th' : {1: 'st', 2: 'nd', 3: 'rd'}[j % 10] || 'th';
                Severity: Minor
                Found in lib/public/javascripts/humanize.js and 1 other location - About 35 mins to fix
                lib/public/javascripts/humanize.js on lines 378..378

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

                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 6 locations. Consider refactoring.
                Open

                    ja: {
                      year: "年",
                      month: "月",
                      week: "週",
                      day: "日",
                Severity: Major
                Found in lib/public/javascripts/humanize_duration.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 97..106
                lib/public/javascripts/humanize_duration.js on lines 157..166
                lib/public/javascripts/jquery-terminal.js on lines 1935..1944
                lib/public/javascripts/jquery-terminal.js on lines 1945..1954
                lib/public/javascripts/jquery-terminal.js on lines 1955..1964

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

                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 6 locations. Consider refactoring.
                Open

                            normal: {
                                black: '#000',
                                red: '#A00',
                                green: '#008400',
                                yellow: '#A50',
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 87..96
                lib/public/javascripts/humanize_duration.js on lines 97..106
                lib/public/javascripts/humanize_duration.js on lines 157..166
                lib/public/javascripts/jquery-terminal.js on lines 1945..1954
                lib/public/javascripts/jquery-terminal.js on lines 1955..1964

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

                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 6 locations. Consider refactoring.
                Open

                    tr: {
                      year: "yıl",
                      month: "ay",
                      week: "hafta",
                      day: "gün",
                Severity: Major
                Found in lib/public/javascripts/humanize_duration.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 87..96
                lib/public/javascripts/humanize_duration.js on lines 97..106
                lib/public/javascripts/jquery-terminal.js on lines 1935..1944
                lib/public/javascripts/jquery-terminal.js on lines 1945..1954
                lib/public/javascripts/jquery-terminal.js on lines 1955..1964

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

                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 6 locations. Consider refactoring.
                Open

                    ko: {
                      year: "년",
                      month: "개월",
                      week: "주일",
                      day: "일",
                Severity: Major
                Found in lib/public/javascripts/humanize_duration.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 87..96
                lib/public/javascripts/humanize_duration.js on lines 157..166
                lib/public/javascripts/jquery-terminal.js on lines 1935..1944
                lib/public/javascripts/jquery-terminal.js on lines 1945..1954
                lib/public/javascripts/jquery-terminal.js on lines 1955..1964

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

                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 6 locations. Consider refactoring.
                Open

                            faited: {
                                black: '#000',
                                red: '#640000',
                                green: '#006100',
                                yellow: '#737300',
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 87..96
                lib/public/javascripts/humanize_duration.js on lines 97..106
                lib/public/javascripts/humanize_duration.js on lines 157..166
                lib/public/javascripts/jquery-terminal.js on lines 1935..1944
                lib/public/javascripts/jquery-terminal.js on lines 1955..1964

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

                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 6 locations. Consider refactoring.
                Open

                            bold: {
                                black: '#000',
                                red: '#F55',
                                green: '#44D544',
                                yellow: '#FF5',
                Severity: Major
                Found in lib/public/javascripts/jquery-terminal.js and 5 other locations - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 87..96
                lib/public/javascripts/humanize_duration.js on lines 97..106
                lib/public/javascripts/humanize_duration.js on lines 157..166
                lib/public/javascripts/jquery-terminal.js on lines 1935..1944
                lib/public/javascripts/jquery-terminal.js on lines 1945..1954

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

                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

                    "zh-CN": {
                      year: "年",
                      month: "个月",
                      week: "周",
                      day: "天",
                Severity: Minor
                Found in lib/public/javascripts/humanize_duration.js and 1 other location - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 177..186

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

                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

                    "zh-TW": {
                      year: "年",
                      month: "個月",
                      week: "周",
                      day: "天",
                Severity: Minor
                Found in lib/public/javascripts/humanize_duration.js and 1 other location - About 35 mins to fix
                lib/public/javascripts/humanize_duration.js on lines 167..176

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

                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':
                                    this.$bar.css({
                                        borderRadius: '0px 0px 5px 5px',
                                        borderBottom: '2px solid #eee',
                                        borderLeft: '2px solid #eee',
                Severity: Minor
                Found in lib/public/javascripts/noty/themes/default.js and 1 other location - About 35 mins to fix
                lib/public/javascripts/noty/themes/default.js on lines 113..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 46.

                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