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 ) {
Function createMarkerImage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Gmaps4RailsGoogle.prototype.createMarkerImage = function(markerPicture, markerSize, origin, anchor, scaledSize) {
Function PSEUDO
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
PSEUDO: function( match, curLoop, inplace, result, not ) {
Function apply
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
this.apply = function(ctx, x, y, width, height) {
Function createMarkerImage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Gmaps4RailsMapquest.prototype.createMarkerImage = function(markerPicture, markerSize, origin, anchor, scaledSize) {};
Function convolve_even
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function convolve_even(src, dst, mask, width, height) {
Function drawSvg
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
CanvasRenderingContext2D.prototype.drawSvg = function(s, dx, dy, dw, dh) {
Method table_field_row
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def table_field_row(type, field_name, label, field_html, options = {})
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
- Read upRead up
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)
- Read upRead up
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|
- Read upRead up
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)
- Read upRead up
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
- Read upRead up
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
- Read upRead up
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}"
- Read upRead up
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
- Read upRead up
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;
Avoid too many return
statements within this function. Open
return ( context || rootjQuery ).find( selector );
Avoid too many return
statements within this function. Open
return ret;
Avoid too many return
statements within this function. Open
return ret === null ?
undefined :
ret;