Showing 829 of 1,274 total issues
Method damageBonus
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def damageBonus(command)
m = /^DB(\d+)$/i.match(command)
unless m
return nil
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 eval_game_system_specific_command
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
debug("eval_game_system_specific_command Begin")
result = judgeRoll(command)
return result unless result.nil?
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, item1, item2, item3, item4, item5)
Method check_result_legacy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def check_result_legacy(total, rand_results, cmp_op, target)
sides_list = rand_results.map(&:sides)
value_list = rand_results.map(&:value)
dice_total = value_list.sum()
- 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 dice_command
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def dice_command(command)
command = command.upcase if @enabled_upcase_input
m = self.class.prefixes_pattern.match(command)
unless m
- 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_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, _dice_list, cmp_op, target)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, _dice_list, cmp_op, target)
Method checkRoll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def checkRoll(diceCount, target, damage, criticalTrigger, criticalNumber)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, _dice_list, cmp_op, target)
Method result_nd6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_nd6(total, _dice_total, dice_list, cmp_op, target)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(_total, _dice_total, dice_list, _cmp_op, _target)
Method getReactionText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def getReactionText(name, typeText1, typeText2, infos1, infos2)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, _dice_list, cmp_op, target)
Method result_nd6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_nd6(total, dice_total, dice_list, cmp_op, target)
Method result_nd6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_nd6(total, dice_total, dice_list, cmp_op, target)
Method result_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, dice_list, cmp_op, target)
Method roll_attack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def roll_attack(power_expression, dice_count_expression, border_expression, modification_operator, modification_expression)
Method getRollResultTextAndSuccesValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def getRollResultTextAndSuccesValue(dice, advancedRoll, rollTarget, accidentValue, isMuse)