diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ed4b314..b8a48ee 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -301,14 +301,6 @@ Naming/UncommunicativeMethodArgName: - 'lib/scrum/sprint_board.rb' - 'lib/scrum/sprint_planning_board.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: AutoCorrect. -Performance/HashEachMethods: - Exclude: - - 'lib/cli.rb' - - 'lib/scrum/creator.rb' - # Offense count: 1 # Cop supports --auto-correct. Security/YAMLLoad: diff --git a/lib/cli.rb b/lib/cli.rb index 31c347d..d88a47f 100644 --- a/lib/cli.rb +++ b/lib/cli.rb @@ -134,7 +134,7 @@ def get_checklists def burndowns process_global_options options board_list = YAML.load_file(options['board-list']) - board_list.keys.each do |name| + board_list.each_key do |name| raise 'invalid character in team name' if name =~ /[^[:alnum:]. _]/ # sanitize board = board_list[name] if options['output'] diff --git a/lib/scrum/creator.rb b/lib/scrum/creator.rb index 9ed1751..1fb94f8 100644 --- a/lib/scrum/creator.rb +++ b/lib/scrum/creator.rb @@ -9,7 +9,7 @@ def create private def create_labels(board_id) - @scrum.label_names.each { |_, name| Trello::Label.create(name: name, board_id: board_id) } + @scrum.label_names.each_value { |name| Trello::Label.create(name: name, board_id: board_id) } end def create_sprint_board