Showing 71 of 77 total issues
Avoid too many return
statements within this method. Open
return "6"
Avoid too many return
statements within this method. Open
return "delphi"
Avoid too many return
statements within this method. Open
return "D"
Avoid too many return
statements within this method. Open
return "python3"
Avoid too many return
statements within this method. Open
return "7"
Method get_commit_message
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_commit_message status
if @options[:message].nil?
message = @config["submit_rules"]["message"] || DEFAULT_COMMIT_MESSAGE
message = message.gsub '${site}', get_site_name
message = message.gsub '${problem-id}', get_problem_id(options)
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run
p options
unless has_next_token?
puts "Missing argument <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 init_global
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def init_global
$git_contest_home = File.expand_path(ENV['GIT_CONTEST_HOME'] || File.join("~", ".git-contest"))
$git_contest_config = File.expand_path(ENV['GIT_CONTEST_CONFIG'] || File.join($git_contest_home, "config.yml"))
if Git.do_no_echo 'branch'
$MASTER = Git.do 'config --get git.contest.branch.master'
- 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 submit_ext
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def submit_ext
trigger 'start'
problem_id = @options[:problem_id]
if (@options[:contest_id])
- 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 set_default_options
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_default_options
options[:edit] = true if options[:edit].nil?
options[:keep] = false if options[:keep].nil?
options[:rebase] = false if options[:rebase].nil?
options[:force_delete] = false if options[:force_delete].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 run_site_add
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run_site_add
# git-contest-config site add
if tokens.length == 1
puts "# input site config (password will be hidden)"
- 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"