NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

Function bridge has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.widget.bridge = function( name, object ) {
    var fullName = object.prototype.widgetFullName || name;
    $.fn[ name ] = function( options ) {
        var isMethodCall = typeof options === "string",
            args = slice.call( arguments, 1 ),
Severity: Minor
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

    Function _makeResizable has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _makeResizable: function() {
            var that = this,
                options = this.options,
                handles = options.resizable,
                // .ui-resizable has position: relative defined in the stylesheet
    Severity: Minor
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

              left: function() {
                  $.ui.position.flip.left.apply( this, arguments );
                  $.ui.position.fit.left.apply( this, arguments );
              },
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1427..1430

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

      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

              top: function() {
                  $.ui.position.flip.top.apply( this, arguments );
                  $.ui.position.fit.top.apply( this, arguments );
              }
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1423..1426

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

      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

                      case 36: if (event.ctrlKey || event.metaKey) {
                                  $.datepicker._gotoToday(event.target);
                              }
                              handled = event.ctrlKey || event.metaKey;
                              break; // current on ctrl or command +home
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 3606..3610

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

      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

                      case 35: if (event.ctrlKey || event.metaKey) {
                                  $.datepicker._clearDate(event.target);
                              }
                              handled = event.ctrlKey || event.metaKey;
                              break; // clear on ctrl or command +end
      Severity: Major
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
      lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 3611..3615

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

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

          _on: function( suppressDisabledCheck, element, handlers ) {
              var delegateElement,
                  instance = this;
      
              // no suppressDisabledCheck flag, shuffle arguments
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

        Function each has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            each: function( obj, callback, args ) {
                var value,
                    i = 0,
                    length = obj.length,
                    isArray = isArraylike( obj );
        Severity: Minor
        Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

          Function _updateDateTime has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _updateDateTime: function(dp_inst) {
                      dp_inst = this.inst || dp_inst;
                      var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
                          dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
                          formatCfg = $.datepicker._getFormatConfig(dp_inst),
          Severity: Minor
          Found in lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

                    if ( options.my[ 1 ] === "bottom" ) {
                        position.top -= elemHeight;
                    } else if ( options.my[ 1 ] === "center" ) {
                        position.top -= elemHeight / 2;
                    }
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1156..1160
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1162..1166
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1184..1188

            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

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

                if ( options.at[ 0 ] === "right" ) {
                    basePosition.left += targetWidth;
                } else if ( options.at[ 0 ] === "center" ) {
                    basePosition.left += targetWidth / 2;
                }
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1162..1166
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1184..1188
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1190..1194

            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

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

                    if ( options.my[ 0 ] === "right" ) {
                        position.left -= elemWidth;
                    } else if ( options.my[ 0 ] === "center" ) {
                        position.left -= elemWidth / 2;
                    }
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1156..1160
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1162..1166
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1190..1194

            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

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

                if ( options.at[ 1 ] === "bottom" ) {
                    basePosition.top += targetHeight;
                } else if ( options.at[ 1 ] === "center" ) {
                    basePosition.top += targetHeight / 2;
                }
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 3 other locations - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1156..1160
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1184..1188
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 1190..1194

            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

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

                    switch ( origin[ 0 ] ) {
                        case "top": y = 0; break;
                        case "middle": y = 0.5; break;
                        case "bottom": y = 1; break;
                        default: y = origin[ 0 ] / original.height;
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 8028..8033

            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

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

                    switch ( origin[ 1 ] ) {
                        case "left": x = 0; break;
                        case "center": x = 0.5; break;
                        case "right": x = 1; break;
                        default: x = origin[ 1 ] / original.width;
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js and 1 other location - About 1 hr to fix
            lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js on lines 8022..8027

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

                _possibleChars: function (format) {
                    var iFormat,
                        chars = "",
                        literal = false,
                        // Check whether a format character is doubled
            Severity: Minor
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

              Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  drag: function(draggable, event) {
              
                      //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                      if(draggable.options.refreshPositions) {
                          $.ui.ddmanager.prepareOffsets(draggable, event);
              Severity: Minor
              Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                Function drop has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.effects.effect.drop = function( o, done ) {
                
                    var el = $( this ),
                        props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
                        mode = $.effects.setMode( el, o.mode || "hide" ),
                Severity: Minor
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                  Function _respectSize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _respectSize: function( data ) {
                  
                          var o = this._vBoundaries,
                              a = this.axis,
                              ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
                  Severity: Minor
                  Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                    Function _mouseDown has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _mouseDown: function(event) {
                            // don't let more than one widget handle mouseStart
                            if( mouseHandled ) { return; }
                    
                            // we may have missed mouseup (out of window)
                    Severity: Minor
                    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language