NUBIC/surveyor

View on GitHub

Showing 658 of 658 total issues

Function _destroy has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _destroy: function() {
        var contents;

        // clean up main element
        this.element
Severity: Minor
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

    Function _attachHandlers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _attachHandlers: function(inst) {
            var stepMonths = this._get(inst, "stepMonths"),
                id = "#" + inst.id.replace( /\\\\/g, "\\" );
            inst.dpDiv.find("[data-handler]").map(function () {
                var handler = {
    Severity: Minor
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

      Function showHide has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function showHide( elements, show ) {
          var elem,
              values = [],
              index = 0,
              length = elements.length;
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

        Function _determineButtonType has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _determineButtonType: function() {
                var ancestor, labelSelector, checked;
        
                if ( this.element.is("[type=checkbox]") ) {
                    this.type = "checkbox";
        Severity: Minor
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

          Function _setContainment has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _setContainment: function() {
          
                  var over, c, ce,
                      o = this.options;
          
          
          Severity: Minor
          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

            Function refreshPositions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                refreshPositions: function(fast) {
            
                    //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
                    if(this.offsetParent && this.helper) {
                        this.offset.parent = this._getParentOffset();
            Severity: Minor
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

              Function _mouseStart has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _mouseStart: function(event) {
              
                      var curleft, curtop, cursor,
                          o = this.options,
                          iniPos = this.element.position(),
              Severity: Minor
              Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                Function _createButtons has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _createButtons: function() {
                        var that = this,
                            buttons = this.options.buttons;
                
                        // if we already have a button pane, remove it
                Severity: Minor
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                  Function to has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  spaces.hsla.to = function ( rgba ) {
                      if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
                          return [ null, null, null, rgba[ 3 ] ];
                      }
                      var r = rgba[ 0 ] / 255,
                  Severity: Minor
                  Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                    Function _updateDatepicker has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _updateDatepicker: function(inst) {
                            this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
                            instActive = inst; // for delegate hover events
                            inst.dpDiv.empty().append(this._generateHTML(inst));
                            this._attachHandlers(inst);
                    Severity: Minor
                    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                      Function open has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          open: function( event ) {
                              var that = this,
                                  target = $( event ? event.target : this.element )
                                      // we need closest here due to mouseover bubbling,
                                      // but always pointing at the same event target
                      Severity: Minor
                      Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                        Function close has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            close: function( event ) {
                                var that = this,
                                    target = $( event ? event.currentTarget : this.element ),
                                    tooltip = this._find( target );
                        
                        
                        Severity: Minor
                        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

                          Function handlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              handlers: function( event, handlers ) {
                                  var i, matches, sel, handleObj,
                                      handlerQueue = [],
                                      delegateCount = handlers.delegateCount,
                                      cur = event.target;
                          Severity: Minor
                          Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 1 hr to fix

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

                                            if (literal) {
                                                if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
                                                    literal = false;
                                                } else {
                                                    output += format.charAt(iFormat);
                            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 4408..4431

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

                            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

                                        isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.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 12461..12461

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

                            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

                                    var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.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 12462..12462

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

                            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 (literal) {
                                            if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
                                                literal = false;
                                            } else {
                                                chars += format.charAt(iFormat);
                            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 4343..4387

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

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

                                _drop: function(event,custom) {
                            
                                    var draggable = custom || $.ui.ddmanager.current,
                                        childrenIntersection = false;
                            
                            
                            Severity: Minor
                            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                                  _setOption: function( key, value ) {
                                      if ( key === "culture" || key === "numberFormat" ) {
                                          var prevValue = this._parse( this.element.val() );
                                          this.options[ key ] = value;
                                          this.element.val( this._format( prevValue ) );
                              Severity: Minor
                              Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 1 hr to fix

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

                                    _initialActive: function() {
                                        var active = this.options.active,
                                            collapsible = this.options.collapsible,
                                            locationHash = location.hash.substring( 1 );
                                
                                
                                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