Showing 837 of 1,278 total issues
Method getSuccessInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def getSuccessInfo(diceList, crit)
debug("checkSuccess diceList, crit", diceList, crit)
diceCountHash = getDiceCountHash(diceList, crit)
debug("diceCountHash", diceCountHash)
- 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 reRoll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def reRoll(command, isStop)
debug("ReRoll Begin", command)
return nil unless /^ReRoll([\d,]+)(@(\d+))?>=(\d+)$/i =~ command
- 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 getCheckResult
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def getCheckResult(command)
m = /^GS([-+]?\d+)?(?:(?:([@#])([-+]?\d+))(?:([@#])([-+]?\d+))?)?(?:(>=?)(\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 rollFullAuto
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def rollFullAuto(bullet_count, diff, broken_number, dice_num)
output = ""
loopCount = 0
counts = {
- 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 get_roll_result
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_roll_result(result_text, success_dice, ten_dice, _desperaton_ten_dice, desperaton_botch_dice, difficulty)
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)
case command.upcase
when /^(\d+)A(\d*)([CF]?)(\d*)([CF]?)(\d*)$/
counts = Regexp.last_match(1).to_i
judgment = Regexp.last_match(2).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 result_nd6
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def result_nd6(total, _dice_total, dice_list, cmp_op, target)
return nil unless cmp_op == :>=
result = Result.new
sequence = []
- 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 getTotalResult
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def getTotalResult(bitList, successList, countOneList, targetNumber, isStop, canReRoll)
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(name, item1, item2, item3, item4, item5)
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 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 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_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_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_2d6
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def result_2d6(_total, _dice_total, dice_list, _cmp_op, _target)