linguisticexplorer/Linguistic-Explorer

View on GitHub

Showing 282 of 417 total issues

Function on has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
Severity: Minor
Found in public/javascripts/jquery.js - About 35 mins to fix

    Function createMarkerImage has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        Gmaps4RailsGoogle.prototype.createMarkerImage = function(markerPicture, markerSize, origin, anchor, scaledSize) {
    Severity: Minor
    Found in public/javascripts/gmaps4rails/gmaps4rails.googlemaps.js - About 35 mins to fix

      Function PSEUDO has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              PSEUDO: function( match, curLoop, inplace, result, not ) {
      Severity: Minor
      Found in public/javascripts/jquery.js - About 35 mins to fix

        Function apply has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    this.apply = function(ctx, x, y, width, height) {
        Severity: Minor
        Found in public/javascripts/canvg.js - About 35 mins to fix

          Function createMarkerImage has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              Gmaps4RailsMapquest.prototype.createMarkerImage = function(markerPicture, markerSize, origin, anchor, scaledSize) {};
          Severity: Minor
          Found in public/javascripts/gmaps4rails/gmaps4rails.mapquest.js - About 35 mins to fix

            Function convolve_even has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        function convolve_even(src, dst, mask, width, height) {
            Severity: Minor
            Found in public/javascripts/canvg.js - About 35 mins to fix

              Function drawSvg has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh) {
              Severity: Minor
              Found in public/javascripts/canvg.js - About 35 mins to fix

                Method table_field_row has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def table_field_row(type, field_name, label, field_html, options = {})
                Severity: Minor
                Found in app/helpers/table_form_helper.rb - About 35 mins to fix

                  Method build_result_groups has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                        def self.build_result_groups(result)
                  
                          if too_many_for_implication?(result)
                            raise Exceptions::ResultTooManyForImplicationError
                          end
                  Severity: Minor
                  Found in app/models/search_results/mappers/result_mapper_implication_both.rb - About 35 mins 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

                  Method populate_distance_matrix has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def populate_distance_matrix
                      @clusters.each do |key_i, cluster_i|
                        @clusters.each do |key_j, cluster_j|
                          dist = (key_i) == (key_j) ? INFINITY :
                              dynamic_method(@distance_strategy).call(cluster_i.left, cluster_j.left)
                  Severity: Minor
                  Found in app/presenters/hierarchical_clustering.rb - About 35 mins 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

                  Method vals_at has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def vals_at(depth)
                        vals          = @filter.vals_at(depth)
                        category_ids  = @query.group_prop_category_ids(depth)
                  
                        collected_ids = category_ids.collect do |category_id|
                  Severity: Minor
                  Found in app/models/search_results/keyword_filter.rb - About 35 mins 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

                  Method exists has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def exists
                      if params[:ling_name] && params[:prop_name]
                        ling = Ling.find_by_name(params[:ling_name])
                        prop = Property.find_by_name(params[:prop_name])
                        lp = ling && prop && current_group.lings_properties.find_by_ling_id_and_property_id(ling.id, prop.id)
                  Severity: Minor
                  Found in app/controllers/lings_properties_controller.rb - About 35 mins 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

                  Method create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def create
                      @ling = Ling.new(params[:ling]) do |ling|
                        ling.group    = current_group
                        ling.creator  = current_user
                        ling.depth    = params[:ling][:depth].to_i
                  Severity: Minor
                  Found in app/controllers/lings_controller.rb - About 35 mins 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

                  Method cluster has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def cluster(distance = :euclidean, linkage = :avg)
                      @distance_strategy = select_distance_strategy distance
                      @linkage_strategy =  select_linkage_strategy linkage
                  
                      @clusters = {} # Clusters list
                  Severity: Minor
                  Found in app/presenters/hierarchical_clustering.rb - About 35 mins 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

                  Method initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def initialize(c1, c2=nil)
                        raise ArgumentError.new("A Cluster must have at least 1 point, given 0") unless c1.clustering_type?
                        @left = c1
                        @right = c2
                        @name = c2 ? "#{c1.name}-#{c2.name}" : "#{c1.name}"
                  Severity: Minor
                  Found in app/presenters/clustering/cluster.rb - About 35 mins 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

                  Method update has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def update
                      @ling = current_group.lings.find(params[:id])
                      @depth = @ling.depth
                  
                      authorize! :update, @ling
                  Severity: Minor
                  Found in app/controllers/lings_controller.rb - About 35 mins 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

                  Avoid too many return statements within this function.
                  Open

                              return 1;
                  Severity: Major
                  Found in public/javascripts/jquery.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return ( context || rootjQuery ).find( selector );
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return ret;
                      Severity: Major
                      Found in public/javascripts/jquery.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return ret === null ?
                                        undefined :
                                        ret;
                        Severity: Major
                        Found in public/javascripts/jquery.js - About 30 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language