From 4311ad00aa27ee163cf3b280bf32920d891e8e5c Mon Sep 17 00:00:00 2001 From: akumari Date: Mon, 10 Jun 2024 22:10:23 +0530 Subject: [PATCH] Fix Layout/HashAlignment cop --- .rubocop_todo.yml | 7 ++----- test/functional/content_view/component/add_test.rb | 2 +- test/functional/content_view/component/remove_test.rb | 6 +++--- test/functional/content_view/component/update_test.rb | 8 ++++---- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ff184d50..932613fc 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -57,8 +57,8 @@ Layout/ExtraSpacing: Layout/FirstArrayElementIndentation: EnforcedStyle: consistent -# Offense count: 25 -# This cop supports safe autocorrection (--autocorrect). +# Offense count: 17 +# Cop supports --auto-correct. # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. # SupportedHashRocketStyles: key, separator, table # SupportedColonStyles: key, separator, table @@ -67,9 +67,6 @@ Layout/HashAlignment: Exclude: - 'lib/hammer_cli_katello/id_resolver.rb' - 'test/functional/content_export/complete/version_test.rb' - - 'test/functional/content_view/component/add_test.rb' - - 'test/functional/content_view/component/remove_test.rb' - - 'test/functional/content_view/component/update_test.rb' # Offense count: 3 # This cop supports safe autocorrection (--autocorrect). diff --git a/test/functional/content_view/component/add_test.rb b/test/functional/content_view/component/add_test.rb index 1b4ce931..19ec54b1 100644 --- a/test/functional/content_view/component/add_test.rb +++ b/test/functional/content_view/component/add_test.rb @@ -8,7 +8,7 @@ module HammerCLIKatello @composite = ::OpenStruct.new(:id => 2, :name => "composite") @component_version = ::OpenStruct.new(:id => 666, :version => "1.0") @component = ::OpenStruct.new(:id => 6, :name => "component", - :content_view_version => @component_version) + :content_view_version => @component_version) @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") end diff --git a/test/functional/content_view/component/remove_test.rb b/test/functional/content_view/component/remove_test.rb index 3af50925..7b2da8c5 100644 --- a/test/functional/content_view/component/remove_test.rb +++ b/test/functional/content_view/component/remove_test.rb @@ -9,13 +9,13 @@ module HammerCLIKatello @component2 = ::OpenStruct.new(:id => 7, :name => "component2") @content_view_component = ::OpenStruct.new(:id => 1444, - :content_view => @component) + :content_view => @component) @content_view_component2 = ::OpenStruct.new(:id => 1445, - :content_view => @component2) + :content_view => @component2) @composite = ::OpenStruct.new(:id => 2, :name => "composite", - :content_view_components => [@content_view_component]) + :content_view_components => [@content_view_component]) @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") @content_view_components = [@content_view_component, @content_view_component2] end diff --git a/test/functional/content_view/component/update_test.rb b/test/functional/content_view/component/update_test.rb index 7e822895..c66ab3f3 100644 --- a/test/functional/content_view/component/update_test.rb +++ b/test/functional/content_view/component/update_test.rb @@ -7,13 +7,13 @@ module HammerCLIKatello @cmd = %w(content-view component update) @component_version = ::OpenStruct.new(:id => 666, :version => "1.0") @component = ::OpenStruct.new(:id => 6, :name => "component", - :content_view_version => @component_version) + :content_view_version => @component_version) @content_view_component = ::OpenStruct.new(:id => 1444, - :content_view => @component, - :content_view_version => @component_version) + :content_view => @component, + :content_view_version => @component_version) @composite = ::OpenStruct.new(:id => 2, :name => "composite", - :content_view_components => [@content_view_component]) + :content_view_components => [@content_view_component]) @organization = ::OpenStruct.new(:id => 1, :name => "great", :label => "label") end