NUBIC/surveyor

View on GitHub

Showing 371 of 658 total issues

Function Datepicker has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Datepicker() {
    this._curInst = null; // The current instance in use
    this._keyEvent = false; // If the last event was a key event
    this._disabledInputs = []; // List of date picker inputs that have been disabled
    this._datepickerShowing = false; // True if the popup picker is showing , false if not
Severity: Major
Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

    Function _mouseDrag has 74 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _mouseDrag: function(event) {
    
            this.dragged = true;
    
            if (this.options.disabled) {
    Severity: Major
    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

      File jquery.maskedinput.js has 290 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
          Masked Input plugin for jQuery
          Copyright (c) 2007-2013 Josh Bush (digitalbush.com)
          Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
          Version: 1.3.1
      Severity: Minor
      Found in lib/assets/javascripts/surveyor/jquery.maskedinput.js - About 2 hrs to fix

        Function _create has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _create: function() {
                this.activeMenu = this.element;
                // flag used to prevent firing of the click handler
                // as the event bubbles up through nested menus
                this.mouseHandled = false;
        Severity: Major
        Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

          Function buildFragment has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              buildFragment: function( elems, context, scripts, selection ) {
                  var contains, elem, tag, tmp, wrap, tbody, j,
                      l = elems.length,
          
                      // Ensure a safe fragment
          Severity: Major
          Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

            Method parse_and_build has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

              def parse_and_build(context, args, original_method, reference_identifier)
                # clear context
                [ :question,
                  :dependency,
                  :dependency_condition,
            Severity: Minor
            Found in lib/surveyor/parser.rb - About 2 hrs 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 widget has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.widget = function( name, base, prototype ) {
                var fullName, existingConstructor, constructor, basePrototype,
                    // proxiedPrototype allows the provided prototype to remain unmodified
                    // so that it can be used as a mixin for multiple widgets (#8876)
                    proxiedPrototype = {},
            Severity: Major
            Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

              Class PermittedParams has 25 methods (exceeds 20 allowed). Consider refactoring.
              Open

              class PermittedParams < Struct.new(:params)
                # per http://railscasts.com/episodes/371-strong-parameters
                def strong_parameters
                  ActionController::Parameters.new(params)
                end
              Severity: Minor
              Found in app/models/permitted_params.rb - About 2 hrs to fix

                Function _create has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create: function() {
                        var i, handleCount,
                            o = this.options,
                            existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
                            handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
                Severity: Major
                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

                  Function Timepicker has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var Timepicker = function() {
                          this.regional = []; // Available regional settings, indexed by language code
                          this.regional[''] = { // Default regional settings
                              currentText: 'Now',
                              closeText: 'Done',
                  Severity: Major
                  Found in lib/assets/javascripts/surveyor/jquery-ui-timepicker-addon.js - About 2 hrs to fix

                    Function add has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        add: function( elem, types, handler, data, selector ) {
                    
                            var handleObjIn, eventHandle, tmp,
                                events, t, handleObj,
                                special, handlers, type, namespaces, origType,
                    Severity: Major
                    Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

                      Function domManip has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          domManip: function( args, table, callback ) {
                      
                              // Flatten any nested arrays
                              args = core_concat.apply( [], args );
                      
                      
                      Severity: Major
                      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

                        Function matcherFromGroupMatchers has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                            // A counter to specify which element is currently being matched
                            var matcherCachedRuns = 0,
                                bySet = setMatchers.length > 0,
                                byElement = elementMatchers.length > 0,
                        Severity: Major
                        Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

                          Function _open has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _open: function( event, target, content ) {
                                  var tooltip, events, delayedShow,
                                      positionOption = $.extend( {}, this.options.position );
                          
                                  if ( !content ) {
                          Severity: Major
                          Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

                            Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                                if ( postFilter && !postFilter[ expando ] ) {
                                    postFilter = setMatcher( postFilter );
                                }
                                if ( postFinder && !postFinder[ expando ] ) {
                            Severity: Major
                            Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

                              Function done has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      function done( status, nativeStatusText, responses, headers ) {
                                          var isSuccess, success, error, response, modified,
                                              statusText = nativeStatusText;
                              
                                          // Called once
                              Severity: Major
                              Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix

                                Function bounce has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                $.effects.effect.bounce = function( o, done ) {
                                    var el = $( this ),
                                        props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                                
                                        // defaults:
                                Severity: Major
                                Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

                                  Function _contactContainers has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _contactContainers: function(event) {
                                          var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom,
                                              innermostContainer = null,
                                              innermostIndex = null;
                                  
                                  
                                  Severity: Major
                                  Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

                                    Function _showDatepicker has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _showDatepicker: function(input) {
                                            input = input.target || input;
                                            if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
                                                input = $("input", input.parentNode)[0];
                                            }
                                    Severity: Major
                                    Found in lib/assets/javascripts/surveyor/jquery-ui-1.10.0.custom.js - About 2 hrs to fix

                                      Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              superMatcher = function( seed, context, xml, results, expandContext ) {
                                                  var elem, j, matcher,
                                                      setMatched = [],
                                                      matchedCount = 0,
                                                      i = "0",
                                      Severity: Major
                                      Found in lib/assets/javascripts/surveyor/jquery-1.9.0.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language