phodal/congee

View on GitHub

Showing 421 of 421 total issues

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

        showLine: function( line ) {
            var uid = line.getUniqueId();

            line.show();

Severity: Major
Found in ckeditor/plugins/lineutils/plugin.js and 1 other location - About 1 hr to fix
ckeditor/plugins/lineutils/plugin.js on lines 736..743

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

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

    function configFromArray (config) {
        var i, date, input = [], currentDate, yearToUse;

        if (config._d) {
            return;
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js - About 1 hr to fix

    Function toString has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            toString: function(format) {
                var formatSet = !!format;
                format = format || this._format;
    
                var formattedString = false;
    Severity: Minor
    Found in scripts/spectrum/spectrum.js - About 1 hr to fix

      Function editorConfig has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          CKEDITOR.editorConfig = function (config) {
            config.allowedContent = true;
            config.language = 'zh-cn';
            //config.skin = 'minimalist';
            config.pasteFilter = null;
      Severity: Minor
      Found in scripts/app.js - About 1 hr to fix

        Function localRequire has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        function localRequire(deps, callback, errback) {
                            var id, map, requireMod;
        
                            if (options.enableBuildCallback && callback && isFunction(callback)) {
                                callback.__requireJsBuild = true;
        Severity: Minor
        Found in scripts/libs/require.js - About 1 hr to fix

          Function getStyle has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  getStyle: function( uid, type ) {
                      var rel = this.relations[ uid ],
                          loc = this.locations[ uid ][ type ],
                          styles = {},
                          hdiff;
          Severity: Minor
          Found in ckeditor/plugins/lineutils/plugin.js - About 1 hr to fix

            Function locate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    locate: ( function() {
                        function locateSibling( rel, type ) {
                            var sib = rel.element[ type === CKEDITOR.LINEUTILS_BEFORE ? 'getPrevious' : 'getNext' ]();
            
                            // Return the middle point between siblings.
            Severity: Minor
            Found in ckeditor/plugins/lineutils/plugin.js - About 1 hr to fix

              Function onBlockWidgetDrag has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function onBlockWidgetDrag( evt ) {
                      var finder = this.repository.finder,
                          locator = this.repository.locator,
                          liner = this.repository.liner,
                          editor = this.editor,
              Severity: Minor
              Found in ckeditor/plugins/widget/plugin.js - About 1 hr to fix

                Function setupWidget has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function setupWidget( widget, widgetDef ) {
                        setupWrapper( widget );
                        setupParts( widget );
                        setupEditables( widget );
                        setupMask( widget );
                Severity: Minor
                Found in ckeditor/plugins/widget/plugin.js - About 1 hr to fix

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

                      $.fn.spectrum = function (opts, extra) {
                  
                          if (typeof opts == "string") {
                  
                              var returnValue = this;
                  Severity: Minor
                  Found in scripts/spectrum/spectrum.js - About 1 hr to fix

                    Function iterator has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                iterator: function( element ) {
                                    var upcast, upcasted,
                                        data,
                                        i,
                                        upcastsLength,
                    Severity: Minor
                    Found in ckeditor/plugins/widget/plugin.js - About 1 hr to fix

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

                              if ((match = matchers.hsva.exec(color))) {
                                  return { h: match[1], s: match[2], v: match[3], a: match[4] };
                              }
                      Severity: Major
                      Found in scripts/spectrum/spectrum.js and 2 other locations - About 1 hr to fix
                      scripts/spectrum/spectrum.js on lines 2264..2266
                      scripts/spectrum/spectrum.js on lines 2270..2272

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

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

                              if ((match = matchers.hsla.exec(color))) {
                                  return { h: match[1], s: match[2], l: match[3], a: match[4] };
                              }
                      Severity: Major
                      Found in scripts/spectrum/spectrum.js and 2 other locations - About 1 hr to fix
                      scripts/spectrum/spectrum.js on lines 2264..2266
                      scripts/spectrum/spectrum.js on lines 2276..2278

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

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

                              if ((match = matchers.rgba.exec(color))) {
                                  return { r: match[1], g: match[2], b: match[3], a: match[4] };
                              }
                      Severity: Major
                      Found in scripts/spectrum/spectrum.js and 2 other locations - About 1 hr to fix
                      scripts/spectrum/spectrum.js on lines 2270..2272
                      scripts/spectrum/spectrum.js on lines 2276..2278

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

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

                                  completeLoad: function (moduleName) {
                                      var found, args, mod,
                                          shim = getOwn(config.shim, moduleName) || {},
                                          shExports = shim.exports;
                      
                      
                      Severity: Minor
                      Found in scripts/libs/require.js - About 1 hr to fix

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

                            init: function (config) {
                              var Grid = Ractive.extend({
                                isolated: false,
                                template: hrTemplate,
                                data: {
                        Severity: Minor
                        Found in scripts/views/hrView.js - About 1 hr to fix

                          Function updateHelperLocations has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  function updateHelperLocations() {
                                      var s = currentSaturation;
                                      var v = currentValue;
                          
                                      if(allowEmpty && isEmpty) {
                          Severity: Minor
                          Found in scripts/spectrum/spectrum.js - About 1 hr to fix

                            Function diffString2 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function diffString2( 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 1 hr to fix

                              Function walk has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          function walk( object, filter, indent, currentIndent, seen ) {
                                              var nextIndent = currentIndent + indent;
                                              object = filter ? filter( object ) : object;
                                              switch ( typeof object ) {
                                                  case 'string':
                              Severity: Minor
                              Found in scripts/libs/rv.js - About 1 hr to fix

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

                                CKEDITOR.plugins.setLang( 'templates', 'mk', {
                                    button: 'Templates', // MISSING
                                    emptyListMsg: '(No templates defined)', // MISSING
                                    insertOption: 'Replace actual contents', // MISSING
                                    options: 'Template Options', // MISSING
                                Severity: Major
                                Found in ckeditor/plugins/templates/lang/mk.js and 1 other location - About 1 hr to fix
                                ckeditor/plugins/templates/lang/bs.js on lines 5..12

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

                                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