linguisticexplorer/Linguistic-Explorer

View on GitHub

Showing 282 of 417 total issues

Function RenderedElementBase has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        svg.Element.RenderedElementBase = function(node) {
            this.base = svg.Element.ElementBase;
            this.base(node);
            
            this.setContext = function(ctx) {
Severity: Major
Found in public/javascripts/canvg.js - About 2 hrs to fix

    Function removeData has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        removeData: function( elem, name, pvt /* Internal Use Only */ ) {
            if ( !jQuery.acceptData( elem ) ) {
                return;
            }
    
    
    Severity: Major
    Found in public/javascripts/jquery.js - About 2 hrs to fix

      Function offset has 54 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          jQuery.fn.offset = function( options ) {
              var elem = this[0];
      
              if ( options ) {
                  return this.each(function( i ) {
      Severity: Major
      Found in public/javascripts/jquery.js - About 2 hrs to fix

        File rgbcolor.js has 256 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * A class to parse color values
         * @author Stoyan Stefanov <sstoo@gmail.com>
         * @link   http://www.phpied.com/rgb-color-parser-in-javascript/
         * @license Use it if you like it
        Severity: Minor
        Found in public/javascripts/rgbcolor.js - About 2 hrs to fix

          Function Gmaps4Rails has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function Gmaps4Rails() {
                this.map = null;
                this.serviceObject = null;
                this.visibleInfoWindow = null;
                this.userLocation = null;
          Severity: Major
          Found in public/javascripts/gmaps4rails/gmaps4rails.base.js - About 2 hrs to fix

            Function remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                remove: function( elem, types, handler, selector, mappedTypes ) {
            
                    var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
                        t, tns, type, origType, namespaces, origCount,
                        j, events, special, handle, eventType, handleObj;
            Severity: Major
            Found in public/javascripts/jquery.js - About 2 hrs to fix

              Function setContext has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          this.setContext = function(ctx) {
                              // fill
                              if (this.style('fill').isUrlDefinition()) {
                                  var fs = this.style('fill').getFillStyleDefinition(this);
                                  if (fs != null) ctx.fillStyle = fs;
              Severity: Major
              Found in public/javascripts/canvg.js - About 2 hrs to fix

                Consider simplifying this complex logical expression.
                Open

                                if ( ( mappedTypes || origType === handleObj.origType ) &&
                                     ( !handler || handler.guid === handleObj.guid ) &&
                                     ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
                                     ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                    eventType.splice( j--, 1 );
                Severity: Critical
                Found in public/javascripts/jquery.js - About 2 hrs to fix

                  Function step has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      step: function( gotoEnd ) {
                          var p, n, complete,
                              t = fxNow || createFxNow(),
                              done = true,
                              elem = this.elem,
                  Severity: Minor
                  Found in public/javascripts/jquery.js - About 2 hrs to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
                            first.charAt(0) === "<" && !rnocache.test( first ) &&
                            (jQuery.support.checkClone || !rchecked.test( first )) &&
                            (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
                    
                    
                    Severity: Critical
                    Found in public/javascripts/jquery.js - About 2 hrs to fix

                      Method supported_set_values has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def supported_set_values
                          @ling = current_group.lings.find(params[:id])
                          @depth = @ling.depth
                          @categories = current_group.categories.at_depth(@depth)
                          session[:category_id] = params[:category_id] if params[:category_id]
                      Severity: Minor
                      Found in app/controllers/lings_controller.rb - About 1 hr to fix

                        Function setContext has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    this.setContext = function(ctx) {
                                        // initial values
                                        ctx.strokeStyle = 'rgba(0,0,0,0)';
                                        ctx.lineCap = 'butt';
                                        ctx.lineJoin = 'miter';
                        Severity: Minor
                        Found in public/javascripts/canvg.js - About 1 hr to fix

                          Function CHILD has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  CHILD: function( elem, match ) {
                                      var first, last,
                                          doneName, parent, cache,
                                          count, diff,
                                          type = match[1],
                          Severity: Minor
                          Found in public/javascripts/jquery.js - About 1 hr to fix

                            Method supported_submit_values has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def supported_submit_values
                                @ling = current_group.lings.find(params[:id])
                                fresh_vals = LingsProperty.find(:all,
                                                            :conditions => {ling_id: @ling.id, property_id: params[:property_id]})
                                if fresh_vals.count > 1
                            Severity: Minor
                            Found in app/controllers/lings_controller.rb - About 1 hr 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 adjustMapToBounds has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Gmaps4Rails.prototype.adjustMapToBounds = function() {
                                  var bound, circle, map_center, point, polygon, polygon_points, polyline, polyline_points, _i, _j, _k, _l, _len, _len2, _len3, _len4, _len5, _len6, _m, _n, _ref, _ref2, _ref3, _ref4;
                                  if (this.map_options.auto_adjust || this.map_options.bounds !== null) {
                                    this.boundsObject = this.createLatLngBounds();
                                  }
                            Severity: Minor
                            Found in public/javascripts/gmaps4rails/gmaps4rails.base.js - About 1 hr to fix

                              Function ajaxHandleResponses has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function ajaxHandleResponses( s, jqXHR, responses ) {
                              
                                  var contents = s.contents,
                                      dataTypes = s.dataTypes,
                                      responseFields = s.responseFields,
                              Severity: Minor
                              Found in public/javascripts/jquery.js - About 1 hr to fix

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

                                    domManip: function( args, table, callback ) {
                                        var results, first, fragment, parent,
                                            value = args[0],
                                            scripts = [];
                                
                                
                                Severity: Minor
                                Found in public/javascripts/jquery.js - About 1 hr to fix

                                  Function handleRemote has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      handleRemote: function(element) {
                                        var method, url, data,
                                          crossDomain = element.data('cross-domain') || null,
                                          dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType),
                                          options;
                                  Severity: Minor
                                  Found in public/javascripts/jquery_ujs.js - About 1 hr to fix

                                    Function handleRemote has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        handleRemote: function(element) {
                                          var method, url, data,
                                            crossDomain = element.data('cross-domain') || null,
                                            dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType),
                                            options;
                                    Severity: Minor
                                    Found in public/javascripts/rails.js - About 1 hr to fix

                                      Function GradientBase has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              svg.Element.GradientBase = function(node) {
                                                  this.base = svg.Element.ElementBase;
                                                  this.base(node);
                                                  
                                                  this.gradientUnits = this.attribute('gradientUnits').valueOrDefault('objectBoundingBox');
                                      Severity: Minor
                                      Found in public/javascripts/canvg.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language