phodal/congee

View on GitHub

Showing 421 of 421 total issues

Function exec has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        exec: function( editor ) {
            var sHTML,
                config = editor.config,
                baseTag = config.baseHref ? '<base href="' + config.baseHref + '"/>' : '',
                eventData;
Severity: Major
Found in ckeditor/plugins/preview/plugin.js - About 2 hrs to fix

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

        function to (time, withoutSuffix) {
            if (!this.isValid()) {
                return this.localeData().invalidDate();
            }
            return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
    Severity: Major
    Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 2 hrs to fix
    ckeditor/plugins/autosave/js/moment.js on lines 1954..1959

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

    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 from (time, withoutSuffix) {
            if (!this.isValid()) {
                return this.localeData().invalidDate();
            }
            return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
    Severity: Major
    Found in ckeditor/plugins/autosave/js/moment.js and 1 other location - About 2 hrs to fix
    ckeditor/plugins/autosave/js/moment.js on lines 1965..1970

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

    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

                switch(max) {
                    case r: h = (g - b) / d + (g < b ? 6 : 0); break;
                    case g: h = (b - r) / d + 2; break;
                    case b: h = (r - g) / d + 4; break;
                }
    Severity: Major
    Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
    scripts/spectrum/spectrum.js on lines 1579..1583

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

    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

                switch(max) {
                    case r: h = (g - b) / d + (g < b ? 6 : 0); break;
                    case g: h = (b - r) / d + 2; break;
                    case b: h = (r - g) / d + 4; break;
                }
    Severity: Major
    Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
    scripts/spectrum/spectrum.js on lines 1645..1649

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

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

                check: function () {
                    if (!this.enabled || this.enabling) {
                        return;
                    }
    
    
    Severity: Major
    Found in scripts/libs/require.js - About 2 hrs to fix

      Function init has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          init : function(editor)
          {        
            var host='latex.codecogs.com';
            var http=('https:' == document.location.protocol ? 'https://' : 'http://');
                  
      Severity: Major
      Found in ckeditor/plugins/eqneditor/plugin.js - About 2 hrs to fix

        Function updateCounter has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function updateCounter(editorInstance) {
                    var paragraphs = 0,
                        wordCount = 0,
                        charCount = 0,
                        text;
        Severity: Major
        Found in ckeditor/plugins/wordcount/plugin.js - About 2 hrs to fix

          Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var init = function () {
              /**
               * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
               * For licensing, see LICENSE.md or http://ckeditor.com/license
               */
          Severity: Major
          Found in scripts/app.js - About 2 hrs to fix

            Function loader has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var loader = function( pluginId, ext, allowExts, compile ) {
                        if ( arguments.length == 3 ) {
                            compile = allowExts;
                            allowExts = undefined;
                        } else if ( arguments.length == 2 ) {
            Severity: Major
            Found in scripts/libs/rv.js - About 2 hrs to fix

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

                          else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
                              color.s = convertToPercentage(color.s);
                              color.l = convertToPercentage(color.l);
                              rgb = hslToRgb(color.h, color.s, color.l);
                              ok = true;
              Severity: Major
              Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
              scripts/spectrum/spectrum.js on lines 1508..1521

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

              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 (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE) {
                              if (event.data.space == "top") {
                                  event.data.html += "<div class=\"cke_wordcount\" style=\"\"" +
                                      " title=\"" +
                                      editor.lang.wordcount.title +
              Severity: Major
              Found in ckeditor/plugins/wordcount/plugin.js and 1 other location - About 2 hrs to fix
              ckeditor/plugins/wordcount/plugin.js on lines 325..335

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

              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 {
                              if (event.data.space == "bottom") {
                                  event.data.html += "<div class=\"cke_wordcount\" style=\"\"" +
                                      " title=\"" +
                                      editor.lang.wordcount.title +
              Severity: Major
              Found in ckeditor/plugins/wordcount/plugin.js and 1 other location - About 2 hrs to fix
              ckeditor/plugins/wordcount/plugin.js on lines 315..325

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

              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 if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
                              color.s = convertToPercentage(color.s);
                              color.v = convertToPercentage(color.v);
                              rgb = hsvToRgb(color.h, color.s, color.v);
                              ok = true;
              Severity: Major
              Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
              scripts/spectrum/spectrum.js on lines 1515..1521

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

              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 ( typeof height == 'string' && height.length > 1 && height.substr( height.length - 1, 1 ) == '%' )
                          height = parseInt( window.screen.height * parseInt( height, 10 ) / 100, 10 );
              Severity: Major
              Found in ckeditor/plugins/popup/plugin.js and 1 other location - About 2 hrs to fix
              ckeditor/plugins/popup/plugin.js on lines 24..25

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

              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 ( typeof width == 'string' && width.length > 1 && width.substr( width.length - 1, 1 ) == '%' )
                          width = parseInt( window.screen.width * parseInt( width, 10 ) / 100, 10 );
              Severity: Major
              Found in ckeditor/plugins/popup/plugin.js and 1 other location - About 2 hrs to fix
              ckeditor/plugins/popup/plugin.js on lines 27..28

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

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

                  function Liner( editor, def ) {
                      var editable = editor.editable();
              
                      CKEDITOR.tools.extend( this, {
                          editor: editor,
              Severity: Major
              Found in ckeditor/plugins/lineutils/plugin.js - About 2 hrs to fix

                Function checkLoaded has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        function checkLoaded() {
                            var err, usingPathFallback,
                                waitInterval = config.waitSeconds * 1000,
                                //It is possible to disable the wait interval by using waitSeconds of 0.
                                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                Severity: Major
                Found in scripts/libs/require.js - About 2 hrs to fix

                  Function onLoad has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          onLoad: function() {
                              CKEDITOR.addCss(
                                  '.cke_widget_wrapper{' +
                                      'position:relative;' +
                                      'outline:none' +
                  Severity: Major
                  Found in ckeditor/plugins/widget/plugin.js - About 2 hrs to fix

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

                            toHsv: function() {
                                var hsv = rgbToHsv(this._r, this._g, this._b);
                                return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
                            },
                    Severity: Major
                    Found in scripts/spectrum/spectrum.js and 1 other location - About 2 hrs to fix
                    scripts/spectrum/spectrum.js on lines 1296..1299

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

                    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