Showing 21 of 41 total issues
Class ScrumBoard
has 37 methods (exceeds 20 allowed). Consider refactoring. Open
class ScrumBoard
class DoneColumnNotFoundError < StandardError; end
class AcceptedColumnNotFoundError < StandardError; end
Function drawBars
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def drawBars(self, color, color_unplanned):
if len(self.total) > 1:
width = 0.2
offset = 0
days = self.x
- 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
Class Card
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Card
# Assuming we have card titles as follows '(8) This is the card name'
ESTIMATED_REGEX = /\(([\d.]+)\)/
SPRINT_NUMBER_REGEX = /\ASprint (\d+)/
Class BurndownChart
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class BurndownChart
attr_accessor :data
def initialize(settings)
Consider simplifying this complex logical expression. Open
if @config
@developer_public_key = @config['developer_public_key']
@member_token = @config['member_token']
@board_aliases = @config['board_aliases'] || {}
@scrum = OpenStruct.new(@config['scrum'] || scrum_defaults)
Method fetch_swimlanes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def fetch_swimlanes
@settings.swimlanes.each do |swimlane|
board.todo_columns.each do |column|
column.cards.each do |card|
@swimlanes[swimlane].add_todo(card.story_points) if card.label?(swimlane)
- 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
Function getSprintData
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def getSprintData(self, burndown):
self.sprint_number = burndown["meta"]["sprint"]
self.weekend_lines = burndown["meta"]["weekend_lines"]
self.total_days = burndown["meta"]["total_days"]
self.extra_day = 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 process_options
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def process_options(hash)
return [] unless hash
[].tap do |cli_switches|
cli_switches << '--no-tasks' if hash['no-tasks']
cli_switches << '--with-fast-lane' if hash['with-fast-lane']
- 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 show
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def show(board_id, version, options = {})
out = options[:output] || STDOUT
backup_path = File.join(@directory, board_id, version)
- 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 to_hash
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_hash
base = {
'date' => date_time.to_date.to_s,
'updated_at' => date_time.to_s,
'story_points' => {
Method show
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def show(board_id, version, options = {})
out = options[:output] || STDOUT
backup_path = File.join(@directory, board_id, version)
Method update
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def update(options)
burndown_data_path = load_sprint(options['output'] || Dir.pwd, options[:sprint_number])
@data['meta']['board_id'] = options['board-id'] if options.key?('board-id')
burndown_data = BurndownData.new(@settings)
- 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
Function getSprintData
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def getSprintData(self, burndown):
self.sprint_number = burndown["meta"]["sprint"]
self.weekend_lines = burndown["meta"]["weekend_lines"]
self.total_days = burndown["meta"]["total_days"]
self.extra_day = 0
Function draw
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw(self, y_label, color, color_unplanned, marker, linestyle, linewidth, label, plot):
Method inspect_backlog
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def inspect_backlog
@planning_board.backlog_cards.each do |card|
if @seabed_card && card == @seabed_card
break
elsif @waterline_card && card == @waterline_card
- 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 multi_update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def multi_update
CliSettings.process_global_options options
board_list = YAML.load_file(options['board-list'])
board_list.each_key do |name|
raise 'invalid character in team name' if name =~ /[^[:alnum:]. _]/ # sanitize
- 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
Function calculateYRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calculateYRange(self, total_story_points, bonus_tasks_done, bonus_story_points_done, unplanned_tasks_done, unplanned_story_points_done):
Function drawUnplanned
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def drawUnplanned(self, color_unplanned, marker, linestyle, linewidth, label):
Function calculateYRange
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def calculateYRange(self, total_story_points, bonus_tasks_done, bonus_story_points_done, unplanned_tasks_done, unplanned_story_points_done):
self.ymax = total_story_points + 3
if len(bonus_tasks_done) > 0:
ymin_bonus_tasks = min(bonus_tasks_done) -3
- 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 require_trello_credentials
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.require_trello_credentials
write_back = false
unless @@settings.developer_public_key
puts 'Put in Trello developer public key:'
- 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"