phodal/congee

View on GitHub

Showing 200 of 421 total issues

Function _decompress has 147 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _decompress: function (length, resetValue, getNextValue) {
        var dictionary = [],
            next,
            enlargeIn = 4,
            dictSize = 4,
Severity: Major
Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js - About 5 hrs to fix

    Function buildView has 124 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        buildView: function (params) {
            var baseTextLines = params.baseTextLines;
            var newTextLines = params.newTextLines;
            var opcodes = params.opcodes;
            var baseTextName = params.baseTextName ? params.baseTextName : "Base Text";
    Severity: Major
    Found in ckeditor/plugins/autosave/js/diffview.js - About 4 hrs to fix

      File plugin.js has 352 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /**
       * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
       * For licensing, see LICENSE.md or http://ckeditor.com/license
       */
      
      
      Severity: Minor
      Found in ckeditor/plugins/notification/plugin.js - About 4 hrs to fix

        Function output has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        InlineLexer.prototype.output = function(src) {
          var out = ''
            , link
            , text
            , href
        Severity: Major
        Found in ckeditor/plugins/markdown/js/marked.js - About 4 hrs to fix

          Function diffString has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
          Open

          function diffString( o, n ) {
            o = o.replace(/\s+$/, '');
            n = n.replace(/\s+$/, '');
          
            var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/) );
          Severity: Minor
          Found in ckeditor/plugins/autosave/js/jsdiff.js - About 3 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function _layout has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _layout: function() {
                  var area = this.element,
                      editor = this.editor,
                      contentsRect = editor.ui.contentsElement.getClientRect(),
                      contentsPos = editor.ui.contentsElement.getDocumentPosition(),
          Severity: Major
          Found in ckeditor/plugins/notification/plugin.js - About 3 hrs to fix

            File plugin.js has 324 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * Floating-Tools
             * Author: Philipp Stracker (2013)
             * Project page: http://stracker-phil.github.com/Floating-Tools/
             */
            Severity: Minor
            Found in ckeditor/plugins/floating-tools/plugin.js - About 3 hrs to fix

              Function callPlugin has 94 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          callPlugin: function () {
                              var map = this.map,
                                  id = map.id,
                                  //Map already normalized the prefix.
                                  pluginMap = makeModuleMap(map.prefix);
              Severity: Major
              Found in scripts/libs/require.js - About 3 hrs to fix

                Function tok has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Parser.prototype.tok = function() {
                  switch (this.token.type) {
                    case 'space': {
                      return '';
                    }
                Severity: Major
                Found in ckeditor/plugins/markdown/js/marked.js - About 3 hrs to fix

                  Function makeRequire has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              makeRequire: function (relMap, options) {
                                  options = options || {};
                  
                                  function localRequire(deps, callback, errback) {
                                      var id, map, requireMod;
                  Severity: Major
                  Found in scripts/libs/require.js - About 3 hrs to fix

                    File difflib.js has 310 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /***
                    This is part of jsdifflib v1.0. <http://snowtide.com/jsdifflib>
                    
                    Copyright (c) 2007, Snowtide Informatics Systems, Inc.
                    All rights reserved.
                    Severity: Minor
                    Found in ckeditor/plugins/autosave/js/difflib.js - About 3 hrs to fix

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

                              init: function(editor) {
                                  // Source mode in inline editors is only available through the "sourcedialog" plugin.
                                  if (editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE)
                                      return;
                      
                      
                      Severity: Major
                      Found in ckeditor/plugins/markdown/plugin.js - About 3 hrs to fix

                        Function setupDragAndDrop has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function setupDragAndDrop( widgetsRepo ) {
                                var editor = widgetsRepo.editor,
                                    lineutils = CKEDITOR.plugins.lineutils;
                        
                                // These listeners handle inline and block widgets drag and drop.
                        Severity: Major
                        Found in ckeditor/plugins/widget/plugin.js - About 3 hrs to fix

                          File plugin.js has 292 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          /**
                           * @license Copyright (c) CKSource - Frederico Knabben. All rights reserved.
                           * For licensing, see LICENSE.html or http://ckeditor.com/license
                           */
                          
                          
                          Severity: Minor
                          Found in ckeditor/plugins/wordcount/plugin.js - About 3 hrs to fix

                            Function pixelSearch has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    pixelSearch: ( function() {
                                        var contains = CKEDITOR.env.ie || CKEDITOR.env.webkit ?
                                            function( el, found ) {
                                                return el.contains( found );
                                            } : function( el, found ) {
                            Severity: Major
                            Found in ckeditor/plugins/lineutils/plugin.js - About 2 hrs to fix

                              Function _layout has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  _layout: function() {
                                      var area = this.element,
                                          editor = this.editor,
                                          contentsRect = editor.ui.contentsElement.getClientRect(),
                                          contentsPos = editor.ui.contentsElement.getDocumentPosition(),
                              Severity: Minor
                              Found in ckeditor/plugins/notification/plugin.js - About 2 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Function marked has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function marked(src, opt, callback) {
                                if (callback || typeof opt === 'function') {
                                  if (!callback) {
                                    callback = opt;
                                    opt = null;
                              Severity: Major
                              Found in ckeditor/plugins/markdown/js/marked.js - About 2 hrs to fix

                                Function configure has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            configure: function (cfg) {
                                                //Make sure the baseUrl ends in a slash.
                                                if (cfg.baseUrl) {
                                                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                                                        cfg.baseUrl += '/';
                                Severity: Major
                                Found in scripts/libs/require.js - About 2 hrs to fix

                                  Function GenerateAutoSaveDialog has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      function GenerateAutoSaveDialog(editorInstance, autoSaveKey) {
                                          CKEDITOR.dialog.add('autosaveDialog', function() {
                                              return {
                                                  title: editorInstance.lang.autosave.title,
                                                  minHeight: 155,
                                  Severity: Major
                                  Found in ckeditor/plugins/autosave/plugin.js - About 2 hrs to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if (a && getParsingFlags(m).overflow === -2) {
                                                overflow =
                                                    a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :
                                                    a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
                                                    a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
                                    Severity: Critical
                                    Found in ckeditor/plugins/autosave/js/moment.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language