Showing 837 of 1,278 total issues
Method resolute_action
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resolute_action(command)
parser = Command::Parser.new("LM", 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 eval_game_system_specific_command
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
m = /\A(\d+)?(YZE|MYZ)(\d+)((\+|-)(\d+))?(\+(\d+))?/.match(command)
unless m
return ''
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 get_roll_params
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_roll_params(params)
min_suc = 0
fumble = 1
critical = 13
isCriticalStop = false
- 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 use_mohumohu_chart
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def use_mohumohu_chart(command)
case command
when 'MMI' then use_6x6_chart(MOHUMOHU_INSECT_CHART, 'もふもふ表・昆虫')
when 'MMA' then use_6x6_chart(MOHUMOHU_ANIMAL_CHART, 'もふもふ表・動物')
when /MMV[VA]?/
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
debug("eval_game_system_specific_command Begin")
parser = Command::Parser.new('VT', round_type: round_type)
.enable_critical
- 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 getRollDiceCommandResult
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def getRollDiceCommandResult(command)
return nil unless command =~ /^(\d*)JD(\d*)(\+(\d*))?(,(\d+))?$/
diceCount = Regexp.last_match(1)
diceCount = 2 if diceCount.empty?
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def check_roll(command)
m = %r{^RB(-?\d+([+\-*/]\d+)*)(@(\d+))?(#(\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 result_1d100
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def result_1d100(total, _dice_total, cmp_op, target)
return Result.nothing if target == '?'
return nil unless cmp_op == :<=
# RuneQuest QUICK-START RULESを元に修正
- 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_sq
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def roll_sq(command)
m = /(\d+)SQ([+\-\d]+)?(([>=]+)(\d+))?/i.match(command)
return nil unless m
dice_count = m[1].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_status
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def result_status(total_sum, n_value_groups, fumble, critical)
return :no_target unless @target
return :fumble if fumble
return :critical if critical
- 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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def result_2d6(total, dice_total, _dice_list, cmp_op, target)
return nil unless cmp_op == :>=
sequence = []
result = Result.new
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def eval_game_system_specific_command(command)
output = ""
type = ""
total_n = ""
- 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 rollStep
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def rollStep(diceType, diceCount)
debug('rollStep diceType, diceCount, @string', diceType, diceCount, @string)
stepTotal = 0
return stepTotal unless diceCount > 0
- 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_guarding
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resolute_guarding(command)
m = /^([-+]\d+)?AG=(\d+)$/.match(command)
return nil unless m
num_bonus = m[1].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 resolute_action
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resolute_action(command)
m = /^(\d+)([-+]\d+)?AM<=(\d+),(\d)$/.match(command)
return nil unless m
num_dice = m[1].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 rollStep
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def rollStep(diceType, diceCount)
debug('rollStep diceType, diceCount, @calcText', diceType, diceCount, @calcText)
stepTotal = 0
return stepTotal unless diceCount > 0
- 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_investigation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resolute_investigation(command)
m = /^([-+]\d+)?AI<=(\d+),(\d)$/.match(command)
return nil unless m
num_bonus = m[1].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 resultStr
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def resultStr(achievement, target, cmp_op, fumble, critical)
return '大失敗' if fumble
return '大成功' if critical
if cmp_op == ">="
return achievement >= target ? "成功" : "失敗"
- 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_treat
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def roll_treat(command)
m = /^TREAT(-?\d+)?$/.match(command)
return nil unless m
unless 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"
Further reading
Method check_lostroyal
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def check_lostroyal(checking_table)
keys = []
3.times do |_i|
key = @randomizer.roll_once(6)
- 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"