phodal/congee

View on GitHub

Showing 421 of 421 total issues

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

                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 35 mins to fix
ckeditor/plugins/autosave/js/moment.js on lines 661..661

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

InlineLexer.output = function(src, links, options) {
  var inline = new InlineLexer(links, options);
  return inline.output(src);
};
Severity: Minor
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 35 mins to fix
ckeditor/plugins/markdown/js/marked.js on lines 909..912

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

    function absCeil (number) {
        if (number < 0) {
            return Math.floor(number);
        } else {
            return Math.ceil(number);
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 35 mins to fix
ckeditor/plugins/autosave/js/moment.js on lines 192..198

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

                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 35 mins to fix
ckeditor/plugins/autosave/js/moment.js on lines 660..660

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

                    while ( ( line = input.readLine() ) !== null ) {
                        stringBuffer.append( lineSeparator );
                        stringBuffer.append( line );
                    }
Severity: Minor
Found in scripts/libs/rv.js and 1 other location - About 35 mins to fix
scripts/libs/text.js on lines 318..321

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

Parser.parse = function(src, options, renderer) {
  var parser = new Parser(options, renderer);
  return parser.parse(src);
};
Severity: Minor
Found in ckeditor/plugins/markdown/js/marked.js and 1 other location - About 35 mins to fix
ckeditor/plugins/markdown/js/marked.js on lines 551..554

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

    function absFloor (number) {
        if (number < 0) {
            return Math.ceil(number);
        } else {
            return Math.floor(number);
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 35 mins to fix
ckeditor/plugins/autosave/js/moment.js on lines 2854..2860

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

Avoid too many return statements within this function.
Open

                return keys.length ? '{' + join( keys.map( function( key ) {
                    return ( legalKey( key ) ? key : JSON.stringify( key ) ) + ':' + walk( object[ key ], filter, indent, nextIndent, seen.slice() );
                } ) ) + '}' : '{}';
Severity: Major
Found in scripts/libs/rv.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return {
                    r: parseIntFromHex(match[1]),
                    g: parseIntFromHex(match[2]),
                    b: parseIntFromHex(match[3]),
                    format: named ? "name" : "hex"
    Severity: Major
    Found in scripts/spectrum/spectrum.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return this.renderer.html(html);
      Severity: Major
      Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return this.renderer.blockquote(body);
        Severity: Major
        Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                              return '[' + join( object.map( function( element ) {
                                  return walk( element, filter, indent, nextIndent, seen.slice() );
                              } ) ) + ']';
          Severity: Major
          Found in scripts/libs/rv.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return this.renderer.table(header, body);
            Severity: Major
            Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return false;
              Severity: Major
              Found in scripts/spectrum/spectrum.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return localRequire;
                Severity: Major
                Found in scripts/libs/require.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return this.renderer.paragraph(this.parseText());
                  Severity: Major
                  Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return Parser.parse(Lexer.lex(src, opt), opt);
                    Severity: Major
                    Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return this.renderer.listitem(body);
                      Severity: Major
                      Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return this.renderer.paragraph(this.inline.output(this.token.text));
                        Severity: Major
                        Found in ckeditor/plugins/markdown/js/marked.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return {
                                          a: convertHexToDecimal(match[1]),
                                          r: parseIntFromHex(match[2]),
                                          g: parseIntFromHex(match[3]),
                                          b: parseIntFromHex(match[4]),
                          Severity: Major
                          Found in scripts/spectrum/spectrum.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language