Method get_horidasibukuro_table
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_horidasibukuro_table(dice)
output = '1'
material_kind = [ # 2D6
"蟲甲", # 5
Method get_horidasibukuro_table
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_horidasibukuro_table(dice)
output = '1'
material_kind = [ # 2D6
"蟲甲", # 5
- 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_dice
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_dice(mod, abl, skl)
total = 0
crit = 0
fumble = 0
dice_c = 3 + mod.abs
- 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_roll
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def check_roll(string)
string = replace_text(string)
return nil unless (m = /(^|\s)S?(3[rR]6([+\-\d]+)?(\[(\d+),(\d+)\])(([>=]+)(\d+))?)(\s|$)/i.match(string))
string = m[2]
Method get_dice
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_dice(mod, abl, skl)
total = 0
crit = 0
fumble = 0
dice_c = 3 + mod.abs
Method check_roll
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_roll(string)
string = replace_text(string)
return nil unless (m = /(^|\s)S?(3[rR]6([+\-\d]+)?(\[(\d+),(\d+)\])(([>=]+)(\d+))?)(\s|$)/i.match(string))
string = m[2]
- 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"