linguisticexplorer/Linguistic-Explorer

View on GitHub

Showing 282 of 417 total issues

Function Deferred has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Deferred: function( func ) {
        var doneList = jQuery.Callbacks( "once memory" ),
            failList = jQuery.Callbacks( "once memory" ),
            progressList = jQuery.Callbacks( "memory" ),
            state = "pending",
Severity: Major
Found in public/javascripts/jquery.js - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

    if ( "getBoundingClientRect" in document.documentElement ) {
        jQuery.fn.offset = function( options ) {
            var elem = this[0], box;
    
            if ( options ) {
    Severity: Critical
    Found in public/javascripts/jquery.js - About 3 hrs to fix

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

              function doAnimation() {
                  // XXX 'this' does not always have a nodeName when running the
                  // test suite
      
                  if ( optall.queue === false ) {
      Severity: Major
      Found in public/javascripts/jquery.js - About 2 hrs to fix

        File gmaps4rails.googlemaps.js has 284 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        (function() {
          var __hasProp = Object.prototype.hasOwnProperty,
            __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
        
          this.Gmaps4RailsGoogle = (function(_super) {
        Severity: Minor
        Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.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 elemData, eventHandle, events,
                      t, tns, type, namespaces, handleObj,
                      handleObjIn, quick, handlers, special;
          Severity: Major
          Found in public/javascripts/jquery.js - About 2 hrs to fix

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

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

              Function filter has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Sizzle.filter = function( expr, set, inplace, not ) {
                  var match, anyFound,
                      type, found, item, filter, left,
                      i, pass,
                      old = expr,
              Severity: Major
              Found in public/javascripts/jquery.js - About 2 hrs to fix

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

                        function done( status, nativeStatusText, responses, headers ) {
                
                            // Called once
                            if ( state === 2 ) {
                                return;
                Severity: Major
                Found in public/javascripts/jquery.js - About 2 hrs to fix

                  Class Converter has 24 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                    class Converter
                  
                      class << self
                        def load(config)
                          validator = new(config)
                  Severity: Minor
                  Found in lib/sswl_data/converter.rb - About 2 hrs to fix

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

                        init: function( selector, context, rootjQuery ) {
                            var match, elem, ret, doc;
                    
                            // Handle $(""), $(null), or $(undefined)
                            if ( !selector ) {
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 2 hrs to fix

                      Function feGaussianBlur has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

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

                        Function svg has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

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

                          Class ResultAdapter has 22 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                            class ResultAdapter
                          
                              attr_internal :result_groups
                          
                              def initialize(query, results)
                          Severity: Minor
                          Found in app/models/search_results/result_adapter.rb - About 2 hrs to fix

                            Function dispatch has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                dispatch: function( event ) {
                            
                                    // Make a writable jQuery.Event from the native event object
                                    event = jQuery.event.fix( event || window.event );
                            
                            
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 2 hrs to fix

                              Function ajaxConvert has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function ajaxConvert( s, response ) {
                              
                                  // Apply the dataFilter if provided
                                  if ( s.dataFilter ) {
                                      response = s.dataFilter( response, s.dataType );
                              Severity: Major
                              Found in public/javascripts/jquery.js - About 2 hrs to fix

                                Function text has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  File d3.phylogram.js has 261 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /*
                                  d3.phylogram.js
                                  Wrapper around a d3-based phylogram (tree where branch lengths are scaled)
                                  Also includes a radial dendrogram visualization (branch lengths not scaled)
                                  along with some helper methods for building angled-branch trees.
                                  Severity: Minor
                                  Found in public/javascripts/d3.phylogram.js - About 2 hrs to fix

                                    Method supported_submit_values_multiple has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      def supported_submit_values_multiple
                                        @ling = current_group.lings.find(params[:id])
                                        stale_values = @ling.lings_properties.find(:all, conditions: {property_id: params[:property_id]})
                                    
                                        collection_authorize! :manage, stale_values if stale_values
                                    Severity: Minor
                                    Found in app/controllers/lings_controller.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 Gmaps4RailsGoogle has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function Gmaps4RailsGoogle() {
                                          Gmaps4RailsGoogle.__super__.constructor.apply(this, arguments);
                                          this.map_options = {
                                            disableDefaultUI: false,
                                            disableDoubleClickZoom: false,
                                    Severity: Major
                                    Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js - About 2 hrs to fix

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

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