Showing 8 of 8 total issues
Class GitUp
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class GitUp
def run(argv)
@fetch = true
process_args(argv)
File git-up.rb
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'colored'
require 'grit'
require 'git-up/version'
Method process_args
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def process_args(argv)
banner = <<BANNER
Fetch and rebase all remotely-tracked branches.
$ git up
Method run
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def run(argv)
@fetch = true
process_args(argv)
- 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 rebase_all_branches
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def rebase_all_branches
col_width = branches.map { |b| b.name.length }.max + 1
branches.each do |branch|
remote = remote_map[branch.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 rebase_all_branches
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def rebase_all_branches
col_width = branches.map { |b| b.name.length }.max + 1
branches.each do |branch|
remote = remote_map[branch.name]
Method process_args
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def process_args(argv)
banner = <<BANNER
Fetch and rebase all remotely-tracked branches.
$ git up
- 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_bundler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_bundler
return unless use_bundler?
begin
require 'bundler'
- 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"