Skip to content

Commit

Permalink
Fix Style/KeywordParametersOrder
Browse files Browse the repository at this point in the history
This cop ensures that optional keyword parameters are positioned at the
end of the parameters list. This promotes readability by following the
common convention of placing required parameters first and optional
parameters last.

https://docs.rubocop.org/rubocop/cops_style.html#stylekeywordparametersorder
  • Loading branch information
archanaserver committed Mar 21, 2024
1 parent cab53ef commit 5a1c01a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/services/foreman/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def render_template_to_tempfile(template:, prefix:, host: nil, params: {}, varia
file
end

def get_source(klass: nil, template:, **args)
def get_source(template:, klass: nil, **args)
klass ||= Foreman::Renderer::Source::Database
klass.new(template)
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/foreman/renderer/source/string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Foreman
module Renderer
module Source
class String < Foreman::Renderer::Source::Base
def initialize(name: 'Unnamed', content:)
def initialize(content:, name: 'Unnamed')
@name = name
@content = content
end
Expand Down
1 change: 0 additions & 1 deletion script/dynflowd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class ArgvParser
* run - run the executor in foreground
BANNER

end
end

Expand Down

0 comments on commit 5a1c01a

Please sign in to comment.