ryz310/pr_comet

View on GitHub

Showing 3 of 3 total issues

Method create! has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def create!(**options)
options[:validate] = true if options[:validate].nil?
return false if options[:validate] && !git_condition_valid?
 
git.push(github_token_url, topic_branch)
Severity: Minor
Found in lib/pr_comet.rb - About 35 mins to fix

Method execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def execute(command)
puts "$ #{command}" if verbose
`#{command}`.chomp.tap do |result|
color = $CHILD_STATUS.success? ? :green : :red
puts Rainbow(result).color(color) if verbose
Severity: Minor
Found in lib/pr_comet/command_line.rb - About 25 mins to fix

Method commit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def commit(message, &block)
git.checkout_with(topic_branch) unless git.current_branch?(topic_branch)
result = modify_files(&block) if block_given?
git.add('.')
git.commit(message)
Severity: Minor
Found in lib/pr_comet.rb - About 25 mins to fix
Severity
Category
Status
Source
Language