Showing 837 of 1,278 total issues
Method compare
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def compare(total, cmd)
if [:<=, :<].include?(cmd.cmp_op)
if !total.send(cmd.cmp_op, cmd.target_number)
Result.failure(nil)
elsif fumble_?(total, cmd.fumble)
- 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 roll_eastal_exploration_table
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def roll_eastal_exploration_table(command)
m = /ESTL(\d+)?([+\-\d]+)?(?:\$(\d+))?/.match(command)
return nil unless m
return nil if m[1].nil? && m[2].nil? && m[3].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 checkRoll
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def checkRoll(command)
debug("checkRoll begin command", command)
result = Result.new
result.text = ''
- 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 roll_existence
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def roll_existence(command)
m = /^EXI<=(\d+)$/.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 checkRoll
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def checkRoll(diceCount, target, damage, criticalTrigger, criticalNumber)
totalSuccessCount = 0
totalCriticalCount = 0
text = ""
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
result = roll_tables(command, TABLES)
return result if result
if (ppc_parse_result = ppc_parser.parse(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 roll_infinite_d66
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def roll_infinite_d66(fixed_score)
steps = []
while steps.empty? || steps.last.to_continue_diceroll?
# 個別の出目をあつかうので、 roll_d66 ではなく roll_barabara を使う
- 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 getInventionAttributeTextDiceCommandResult
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def getInventionAttributeTextDiceCommandResult(command)
return nil unless command =~ /IAT([ABMDLT]*)/
tableName = translate("LogHorizon.IAT.name")
- 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 resolute_action
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def resolute_action(num_dices, defence, dice_change_text)
dices = @randomizer.roll_barabara(num_dices, 6).sort
dice_text = dices.join(",")
output = "(#{remake_command(num_dices, defence, dice_change_text)}) > #{dice_text}"
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
string = command.upcase
table = []
ttype = ""
- 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 resolute_initiative
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def resolute_initiative(command)
parser = Command::Parser.new("LI", round_type: @round_type)
.has_suffix_number
.restrict_cmp_op_to(:>=)
parsed = parser.parse(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 checkRoll
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def checkRoll(diceCount, isActive, modify, target)
dice_list = @randomizer.roll_barabara(diceCount, 6)
dice = dice_list.sum()
diceText = dice_list.join(",")
- 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 a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def check_roll(dice_count, block_no, is_parry)
dice_array = @randomizer.roll_barabara(dice_count, 6).sort
dice_text = dice_array.join(',')
result_array = []
- 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 action_result
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def action_result(total, tens, ones, success_rate)
if total == 100
Result.fumble(MISERY_STR)
elsif success_rate <= 0
Result.fumble(FUMBLE_STR)
- 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 action_result
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def action_result(total, tens, ones, success_rate)
if total == 100 || success_rate <= 0
Result.fumble(FUMBLE_STR)
elsif total <= success_rate - 100
Result.critical(CRITICAL_STR)
- 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 wh_atpos
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def wh_atpos(pos_num, pos_type) # WHFRP2命中部位表
debug("wh_atpos begin pos_type", pos_type)
pos_2l = [
'二足',
15, '頭部',
- 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_urge
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_urge(string) # パラサイトブラッドの衝動表
unless /(\w*)URGE\s*(\d+)/i =~ string
return '1'
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 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"
Further reading
Method eval_game_system_specific_command
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
string = command.upcase
table = []
ttype = ""
- 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 roll_ab
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def roll_ab(command)
m = /^(\d*)AB(\d*)<=(\d+)(?:--([^\d\s]+)(0)?)?$/.match(command)
return nil unless m
times = m[1]
- 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"