Showing 236 of 328 total issues
Avoid too many return
statements within this function. Open
return scanPunctuator();
Avoid too many return
statements within this function. Open
return delegate.createProperty('init', key, parseAssignmentExpression(), false, false);
Avoid too many return
statements within this function. Open
return scanPunctuator();
Avoid too many return
statements within this function. Open
return scanXJSIdentifier();
Avoid too many return
statements within this function. Open
return {
type: Token.Punctuator,
value: ch1,
lineNumber: lineNumber,
lineStart: lineStart,
Avoid too many return
statements within this function. Open
return scanRegExp();
Avoid too many return
statements within this function. Open
return delegate.createProperty('init', key, parsePropertyMethodFunction({ generator: false }), true, false);
Avoid too many return
statements within this function. Open
return parseClassExpression();
Avoid too many return
statements within this function. Open
return delegate.createLiteral(token);
Avoid too many return
statements within this function. Open
return scanPunctuator();
Avoid too many return
statements within this function. Open
return parsePostfixExpression();
Method call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def call
@request = @response = nil # fill in while test
@block.call.tap do |result|
if @request && @response
@service.verify!(
- 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 call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def call(env)
orig_path = env['PATH_INFO']
if orig_path.ends_with?('.js') || orig_path.ends_with?('css') || orig_path.ends_with?('css.map')
@result = @app.call(env)
else
- 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 hashify
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def hashify(object, options = {})
case object
when Lurker::Json::Reference
options[:reference] == :original ? object.to_original_hash(options)
: object.to_hash(options)
- 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 extract_references
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def extract_references(schema, memo = [])
case schema
when Array
schema.each { |payload| extract_references(payload, memo) }
when Hash, Lurker::Json::Schema
- 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 type
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def type
t = @schema["type"]
if t.is_a? Array
types = t.map do |type|
if type.is_a? Hash
- 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"