phodal/congee

View on GitHub

Showing 421 of 421 total issues

Function iso_string__toISOString has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function iso_string__toISOString() {
        // for ISO strings we do not use the normal bubbling rules:
        //  * milliseconds bubble up until they become hours
        //  * days do not bubble at all
        //  * months bubble up until they become years
Severity: Minor
Found in ckeditor/plugins/autosave/js/moment.js - About 1 hr to fix

    Function Widget has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function Widget( widgetsRepo, id, element, widgetDef, startupData ) {
            var editor = widgetsRepo.editor;
    
            // Extend this widget with widgetDef-specific methods and properties.
            CKEDITOR.tools.extend( this, widgetDef, {
    Severity: Minor
    Found in ckeditor/plugins/widget/plugin.js - About 1 hr to fix

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

                children: [{
                  id: 'singer',
                  type: 'text',
                  style: 'width:100%',
                  labelLayout: 'vertical',
      Severity: Major
      Found in ckeditor/plugins/music/dialogs/music.js and 1 other location - About 1 hr to fix
      ckeditor/plugins/music/dialogs/music.js on lines 85..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 58.

      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

                  {
                    id: 'music_name',
                    type: 'text',
                    style: 'width:100%',
                    labelLayout: 'vertical',
      Severity: Major
      Found in ckeditor/plugins/music/dialogs/music.js and 1 other location - About 1 hr to fix
      ckeditor/plugins/music/dialogs/music.js on lines 75..84

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

      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 (line && line.length() && line.charAt(0) === 0xfeff) {
                          // Eat the BOM, since we've already found the encoding on this file,
                          // and we plan to concatenating this buffer with others; the BOM should
                          // only appear at the top of a file.
                          line = line.substring(1);
      Severity: Major
      Found in scripts/libs/text.js and 1 other location - About 1 hr to fix
      scripts/libs/rv.js on lines 175..180

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

      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 ( line && line.length() && line.charAt( 0 ) === 65279 ) {
                              // Eat the BOM, since we've already found the encoding on this file,
                              // and we plan to concatenating this buffer with others; the BOM should
                              // only appear at the top of a file.
                              line = line.substring( 1 );
      Severity: Major
      Found in scripts/libs/rv.js and 1 other location - About 1 hr to fix
      scripts/libs/text.js on lines 309..314

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

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

                          load.fromText = bind(this, function (text, textAlt) {
                              /*jslint evil: true */
                              var moduleName = map.name,
                                  moduleMap = makeModuleMap(moduleName),
                                  hasInteractive = useInteractive;
      Severity: Minor
      Found in scripts/libs/require.js - About 1 hr to fix

        Function startOf has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function startOf (units) {
                units = normalizeUnits(units);
                // the following switch intentionally omits break keywords
                // to utilize falling through the cases.
                switch (units) {
        Severity: Minor
        Found in ckeditor/plugins/autosave/js/moment.js - About 1 hr to fix

          Function bubble has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function bubble () {
                  var milliseconds = this._milliseconds;
                  var days         = this._days;
                  var months       = this._months;
                  var data         = this._data;
          Severity: Minor
          Found in ckeditor/plugins/autosave/js/moment.js - About 1 hr to fix

            Function checkWidgets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function checkWidgets( evt ) {
                    var options = evt.data;
            
                    if ( this.editor.mode != 'wysiwyg' )
                        return;
            Severity: Minor
            Found in ckeditor/plugins/widget/plugin.js - About 1 hr to fix

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

                              if ( neg ) {
                                  this.traverseSearch( neg );
              
                                  // Iterate towards DOM root until neg is a direct child of el.
                                  while ( !neg.getParent().equals( el ) ) {
              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 325..332

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

              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 ( pos ) {
                                  this.traverseSearch( pos );
              
                                  // Iterate towards DOM root until pos is a direct child of el.
                                  while ( !pos.getParent().equals( el ) ) {
              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 316..323

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

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

                  function dayOfYearFromWeekInfo(config) {
                      var w, weekYear, week, weekday, dow, doy, temp;
              
                      w = config._w;
                      if (w.GG != null || w.W != null || w.E != null) {
              Severity: Minor
              Found in ckeditor/plugins/autosave/js/moment.js - About 1 hr to fix

                Function _createElement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _createElement: function() {
                        var notification = this,
                            notificationElement, notificationMessageElement, notificationCloseElement,
                            close = this.editor.lang.common.close;
                
                
                Severity: Minor
                Found in ckeditor/plugins/notification/plugin.js - About 1 hr to fix

                  Function parseName has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          parseName: function (name) {
                              var modName, ext, temp,
                                  strip = false,
                                  index = name.indexOf("."),
                                  isRelative = name.indexOf('./') === 0 ||
                  Severity: Minor
                  Found in scripts/libs/text.js - About 1 hr to fix

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

                            editor.ui.addButton && editor.ui.addButton( 'Smiley', {
                                label: editor.lang.smiley.toolbar,
                                command: 'smiley',
                                toolbar: 'insert,50'
                            } );
                    Severity: Major
                    Found in ckeditor/plugins/smiley/plugin.js and 2 other locations - About 1 hr to fix
                    ckeditor/plugins/selectall/plugin.js on lines 53..57
                    ckeditor/plugins/templates/plugin.js on lines 19..23

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

                    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

                                editor.ui.addButton && editor.ui.addButton( 'SelectAll', {
                                    label: editor.lang.selectall.toolbar,
                                    command: 'selectAll',
                                    toolbar: 'selection,10'
                                } );
                    Severity: Major
                    Found in ckeditor/plugins/selectall/plugin.js and 2 other locations - About 1 hr to fix
                    ckeditor/plugins/smiley/plugin.js on lines 19..23
                    ckeditor/plugins/templates/plugin.js on lines 19..23

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

                    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

                                editor.ui.addButton && editor.ui.addButton( 'Templates', {
                                    label: editor.lang.templates.button,
                                    command: 'templates',
                                    toolbar: 'doctools,10'
                                } );
                    Severity: Major
                    Found in ckeditor/plugins/templates/plugin.js and 2 other locations - About 1 hr to fix
                    ckeditor/plugins/selectall/plugin.js on lines 53..57
                    ckeditor/plugins/smiley/plugin.js on lines 19..23

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

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

                            text.get = function (url, callback, errback, headers) {
                                var xhr = text.createXhr(), header;
                                xhr.open('GET', url, true);
                    
                                //Allow plugins direct access to xhr headers
                    Severity: Minor
                    Found in scripts/libs/text.js - About 1 hr to fix

                      Function start has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              start: function( callback ) {
                                  var that = this,
                                      editor = this.editor,
                                      doc = this.doc,
                                      el, elfp, x, y;
                      Severity: Minor
                      Found in ckeditor/plugins/lineutils/plugin.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language