Showing 837 of 1,278 total issues
Method checkRoll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def checkRoll(hasCritical, modify, target)
dice_list = @randomizer.roll_barabara(2, 6)
dice = dice_list.sum()
diceText = dice_list.join(",")
successValue = dice + modify
- 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 getSuccess
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def getSuccess(targetNumber, stepTotal)
return '自動失敗' if @isFailed
successTable = getSuccessTable
successInfo = get_table_by_number(targetNumber, successTable)
- 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 check_result
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_result(total, rand_results, cmp_op, target)
ret = check_result_legacy(total, rand_results, cmp_op, target)
return ret if ret
sides_list = rand_results.map(&:sides)
- 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 result_nechronica
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def result_nechronica(value_list, target)
if value_list.max >= target
if value_list.max >= 11
Result.critical(translate("Nechronica.critical"))
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
Avoid too many return
statements within this method. Open
return "실패"
Avoid too many return
statements within this method. Open
return Result.success("Low Success")
Avoid too many return
statements within this method. Open
return Result.failure("Failure")
Avoid too many return
statements within this method. Open
return fumble_text if total == 100
Avoid too many return
statements within this method. Open
return fumble_text
Avoid too many return
statements within this method. Open
return getCombineRoll(command)
Avoid too many return
statements within this method. Open
return getHitResult(count, damageFunc, tail)
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return getRegistResult(command)
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return fumble_text if fumbleable
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return Result.success("High Success")
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return output
Avoid too many return
statements within this method. Open
return Result.critical("Colossal Success")