Showing 63 of 84 total issues
Avoid deeply nested control flow statements. Open
url += ".#{fmt}" unless fmt.blank?
Function MustacheNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
MustacheNode: function(rawParams, hash, open, strip, locInfo) {
Function __module1__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var __module1__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
Function __module0__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
Function BlockNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
BlockNode: function(mustache, program, inverse, close, locInfo) {
Method create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create
# for debug, dump to file.
dump_auth_hash unless Rails.env.production?
if identity = Identity.from_omniauth(auth_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"
Further reading
Method find_graveyard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def find_graveyard county, graveyard_path
g = lookup_graveyard(county, graveyard_path)
return g if g
if graveyard_path =~ /(.*)-Cemetery/
- 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 from_omniauth
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.from_omniauth(auth)
ident = where(attrs_from_omniauth(auth)).first_or_initialize do |ident|
raise "#{ident.provider} user id cannot be empty" if ident.uid.to_s.blank?
ident.provider_text = auth.to_yaml
ident.save
- 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
case 24:yy_.yytext = strip(1,2).replace(/\\'/g,"'"); return 32;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
case 23:yy_.yytext = strip(1,2).replace(/\\"/g,'"'); return 32;
Avoid too many return
statements within this function. Open
return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
{text: "", token: null, line: this.yylineno});
Avoid too many return
statements within this function. Open
case 30:yy_.yytext = strip(1,2); return 40;
Avoid too many return
statements within this function. Open
case 21:this.popState(); return 24;
Avoid too many return
statements within this function. Open
case 22:this.popState(); return 18;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return fn(context);
Avoid too many return
statements within this method. Open
return ''
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(attrs={})
attrs[:url].tap do |u|
@url=u unless u.blank?
end
attrs[:title].tap do |t|
- 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 load_current_user
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def load_current_user
ident = current_identity or return nil
ident.user.tap do |u|
return nil unless u
- 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"