phodal/congee

View on GitHub

Showing 421 of 421 total issues

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

    Widget.isDomWidgetWrapper = function( node ) {
        return node.type == CKEDITOR.NODE_ELEMENT && node.hasAttribute( 'data-cke-widget-wrapper' );
    };
Severity: Major
Found in ckeditor/plugins/widget/plugin.js and 4 other locations - About 40 mins to fix
ckeditor/plugins/widget/plugin.js on lines 1515..1517
ckeditor/plugins/widget/plugin.js on lines 1527..1529
ckeditor/plugins/widget/plugin.js on lines 1541..1543
ckeditor/plugins/widget/plugin.js on lines 1553..1555

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

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

    Widget.isDomWidgetElement = function( node ) {
        return node.type == CKEDITOR.NODE_ELEMENT && node.hasAttribute( 'data-widget' );
    };
Severity: Major
Found in ckeditor/plugins/widget/plugin.js and 4 other locations - About 40 mins to fix
ckeditor/plugins/widget/plugin.js on lines 1515..1517
ckeditor/plugins/widget/plugin.js on lines 1527..1529
ckeditor/plugins/widget/plugin.js on lines 1541..1543
ckeditor/plugins/widget/plugin.js on lines 1565..1567

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

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

                    editor.widgets.on( 'instanceDestroyed', function( evt ) {
                        log( 'instance destroyed (id: ' + evt.data.id + ')' );
                    }, null, null, 1 );
Severity: Minor
Found in ckeditor/plugins/widget/dev/console.js and 1 other location - About 40 mins to fix
ckeditor/plugins/widget/dev/console.js on lines 92..94

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

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

                    editor.widgets.on( 'instanceCreated', function( evt ) {
                        log( 'instance created (id: ' + evt.data.id + ')' );
                    }, null, null, 1 );
Severity: Minor
Found in ckeditor/plugins/widget/dev/console.js and 1 other location - About 40 mins to fix
ckeditor/plugins/widget/dev/console.js on lines 88..90

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

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

    Widget.isDomNestedEditable = function( node ) {
        return node.type == CKEDITOR.NODE_ELEMENT && node.hasAttribute( 'data-cke-widget-editable' );
    };
Severity: Major
Found in ckeditor/plugins/widget/plugin.js and 4 other locations - About 40 mins to fix
ckeditor/plugins/widget/plugin.js on lines 1515..1517
ckeditor/plugins/widget/plugin.js on lines 1527..1529
ckeditor/plugins/widget/plugin.js on lines 1553..1555
ckeditor/plugins/widget/plugin.js on lines 1565..1567

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

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 dayOfYearFromWeeks has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js - About 35 mins to fix

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

                function iterate( el, xStart, yStart, step, condition ) {
    Severity: Minor
    Found in ckeditor/plugins/lineutils/plugin.js - About 35 mins to fix

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

              function addCells (row, tidx, tend, textLines, change) {
      Severity: Minor
      Found in ckeditor/plugins/autosave/js/diffview.js - About 35 mins to fix

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

            function list (format, index, field, count, setter) {
        Severity: Minor
        Found in ckeditor/plugins/autosave/js/moment.js - About 35 mins to fix

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

                      function walk( object, filter, indent, currentIndent, seen ) {
          Severity: Minor
          Found in scripts/libs/rv.js - About 35 mins to fix

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

                function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
            Severity: Minor
            Found in ckeditor/plugins/autosave/js/moment.js - About 35 mins to fix

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

                  function createLocalOrUTC (input, format, locale, strict, isUTC) {
              Severity: Minor
              Found in ckeditor/plugins/autosave/js/moment.js - About 35 mins to fix

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

                        writeFile: function (pluginName, moduleName, req, write, config) {
                Severity: Minor
                Found in scripts/libs/text.js - About 35 mins to fix

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

                      function Widget( widgetsRepo, id, element, widgetDef, startupData ) {
                  Severity: Minor
                  Found in ckeditor/plugins/widget/plugin.js - About 35 mins to fix

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

                            function addCellsInline (row, tidx, tidx2, textLines, change) {
                    Severity: Minor
                    Found in ckeditor/plugins/autosave/js/diffview.js - About 35 mins to fix

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

                          Widget.isParserWidgetElement = function( node ) {
                              return node.type == CKEDITOR.NODE_ELEMENT && !!node.attributes[ 'data-widget' ];
                          };
                      Severity: Minor
                      Found in ckeditor/plugins/widget/plugin.js and 1 other location - About 35 mins to fix
                      ckeditor/plugins/widget/plugin.js on lines 1589..1591

                      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 LZString._decompress(input.length, 32, function (index) { return LZString._getBaseValue(LZString._keyStrBase64, input.charAt(index)); });
                      Severity: Minor
                      Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js and 1 other location - About 35 mins to fix
                      ckeditor/plugins/autosave/js/lz-string-1.3.3.js on lines 101..101

                      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 LZString._decompress(input.length, 32, function (index) { return LZString._getBaseValue(LZString._keyStrUriSafe, input.charAt(index)); });
                      Severity: Minor
                      Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js and 1 other location - About 35 mins to fix
                      ckeditor/plugins/autosave/js/lz-string-1.3.3.js on lines 42..42

                      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

                          Widget.isParserWidgetWrapper = function( node ) {
                              return node.type == CKEDITOR.NODE_ELEMENT && !!node.attributes[ 'data-cke-widget-wrapper' ];
                          };
                      Severity: Minor
                      Found in ckeditor/plugins/widget/plugin.js and 1 other location - About 35 mins to fix
                      ckeditor/plugins/widget/plugin.js on lines 1577..1579

                      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

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

                      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