phodal/congee

View on GitHub

Showing 421 of 421 total issues

File moment.js has 2359 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//! moment.js
//! version : 2.10.6
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
Severity: Major
Found in ckeditor/plugins/autosave/js/moment.js - About 6 days to fix

    File spectrum.js has 1802 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Spectrum Colorpicker v1.7.1
    // https://github.com/bgrins/spectrum
    // Author: Brian Grinstead
    // License: MIT
    
    
    Severity: Major
    Found in scripts/spectrum/spectrum.js - About 4 days to fix

      Function newContext has 954 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function newContext(contextName) {
              var inCheckLoaded, Module, context, handlers,
                  checkLoadedTimeoutId,
                  config = {
                      //Defaults. Do not set a default for map
      Severity: Major
      Found in scripts/libs/require.js - About 4 days to fix

        File plugin.js has 1672 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: Major
        Found in ckeditor/plugins/widget/plugin.js - About 4 days to fix

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

                          if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
                              if (context_w.charCodeAt(0) < 256) {
                                  for (i = 0 ; i < context_numBits ; i++) {
                                      context_data_val = (context_data_val << 1);
                                      if (context_data_position == bitsPerChar - 1) {
          Severity: Major
          Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js and 1 other location - About 3 days to fix
          ckeditor/plugins/autosave/js/lz-string-1.3.3.js on lines 220..291

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

          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 (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {
                          if (context_w.charCodeAt(0) < 256) {
                              for (i = 0 ; i < context_numBits ; i++) {
                                  context_data_val = (context_data_val << 1);
                                  if (context_data_position == bitsPerChar - 1) {
          Severity: Major
          Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js and 1 other location - About 3 days to fix
          ckeditor/plugins/autosave/js/lz-string-1.3.3.js on lines 135..206

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

          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

          File require.js has 1276 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /** vim: et:ts=4:sw=4:sts=4
           * @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
           * Available via the MIT or new BSD license.
           * see: http://github.com/jrburke/requirejs for details
           */
          Severity: Major
          Found in scripts/libs/require.js - About 3 days to fix

            Function spectrum has 620 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function spectrum(element, o) {
            
                    var opts = instanceOptions(o, element),
                        flat = opts.flat,
                        showSelectionPalette = opts.showSelectionPalette,
            Severity: Major
            Found in scripts/spectrum/spectrum.js - About 3 days to fix

              Function _compress has a Cognitive Complexity of 149 (exceeds 5 allowed). Consider refactoring.
              Open

                  _compress: function (uncompressed, bitsPerChar, getCharFromInt) {
                      if (uncompressed == null) return "";
                      var i, value,
                          context_dictionary = {},
                          context_dictionaryToCreate = {},
              Severity: Minor
              Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js - About 3 days 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 SequenceMatcher has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring.
              Open

                  SequenceMatcher: function (a, b, isjunk) {
                      this.set_seqs = function (a, b) {
                          this.set_seq1(a);
                          this.set_seq2(b);
                      }
              Severity: Minor
              Found in ckeditor/plugins/autosave/js/difflib.js - About 2 days 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

              File marked.js has 901 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /**
               * marked - a markdown parser
               * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
               * https://github.com/chjj/marked
               */
              Severity: Major
              Found in ckeditor/plugins/markdown/js/marked.js - About 2 days to fix

                Function buildView has a Cognitive Complexity of 99 (exceeds 5 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: Minor
                Found in ckeditor/plugins/autosave/js/diffview.js - About 1 day 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 init has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
                Open

                    init: function (editor) {
                        var defaultFormat = "",
                            intervalId,
                            lastWordCount = -1,
                            lastCharCount = -1,
                Severity: Minor
                Found in ckeditor/plugins/wordcount/plugin.js - About 1 day 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 init has 308 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        init: function( editor ) {
                
                
                            /**
                             * Create the UI elements required by this plugin
                Severity: Major
                Found in ckeditor/plugins/floating-tools/plugin.js - About 1 day to fix

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

                      init: function (editor) {
                          var defaultFormat = "",
                              intervalId,
                              lastWordCount = -1,
                              lastCharCount = -1,
                  Severity: Major
                  Found in ckeditor/plugins/wordcount/plugin.js - About 1 day to fix

                    Function _decompress has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
                    Open

                        _decompress: function (length, resetValue, getNextValue) {
                            var dictionary = [],
                                next,
                                enlargeIn = 4,
                                dictSize = 4,
                    Severity: Minor
                    Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js - About 1 day 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 SequenceMatcher has 259 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        SequenceMatcher: function (a, b, isjunk) {
                            this.set_seqs = function (a, b) {
                                this.set_seq1(a);
                                this.set_seq2(b);
                            }
                    Severity: Major
                    Found in ckeditor/plugins/autosave/js/difflib.js - About 1 day to fix

                      File plugin.js has 526 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: Major
                      Found in ckeditor/plugins/lineutils/plugin.js - About 1 day to fix

                        Function token has 213 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        Lexer.prototype.token = function(src, top, bq) {
                          var src = src.replace(/^ +$/gm, '')
                            , next
                            , loose
                            , cap
                        Severity: Major
                        Found in ckeditor/plugins/markdown/js/marked.js - About 1 day to fix

                          Function _compress has 202 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _compress: function (uncompressed, bitsPerChar, getCharFromInt) {
                                  if (uncompressed == null) return "";
                                  var i, value,
                                      context_dictionary = {},
                                      context_dictionaryToCreate = {},
                          Severity: Major
                          Found in ckeditor/plugins/autosave/js/lz-string-1.3.3.js - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language