Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/225325
Change subject: Fixed Style/TrailingWhitespace RuboCop offense ...................................................................... Fixed Style/TrailingWhitespace RuboCop offense Bug: T105002 Bug: T91485 Change-Id: I9da0cc52cf423149f30c149c74cfabfab556ea99 --- M .rubocop_todo.yml M puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb M puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb M puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb M puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb M puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb M puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb M puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb M puppet/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb 9 files changed, 11 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/25/225325/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 902fc65..32ab4b8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -310,11 +310,6 @@ Style/TrailingComma: Enabled: false -# Offense count: 11 -# Cop supports --auto-correct. -Style/TrailingWhitespace: - Enabled: false - # Offense count: 1 Style/UnlessElse: Enabled: false diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb index ade5462..11d2d7f 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb @@ -4,7 +4,7 @@ module Puppet::Parser::Functions newfunction(:abs, :type => :rvalue, :doc => <<-EOS - Returns the absolute value of a number, for example -34.56 becomes + Returns the absolute value of a number, for example -34.56 becomes 34.56. Takes a single integer and float value as an argument. EOS ) do |arguments| diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb index c99d139..4564a00 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb @@ -4,7 +4,7 @@ module Puppet::Parser::Functions newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS' - Removes the record separator from the end of a string or an array of + Removes the record separator from the end of a string or an array of strings, for example `hello\n` becomes `hello`. Requires a single string or array as an input. EOS diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb index 636b990..f242af3 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb @@ -4,9 +4,9 @@ module Puppet::Parser::Functions newfunction(:chop, :type => :rvalue, :doc => <<-'EOS' - Returns a new string with the last character removed. If the string ends - with `\r\n`, both characters are removed. Applying chop to an empty - string returns an empty string. If you wish to merely remove record + Returns a new string with the last character removed. If the string ends + with `\r\n`, both characters are removed. Applying chop to an empty + string returns an empty string. If you wish to merely remove record separators then you should use the `chomp` function. Requires a string or array of strings as input. EOS diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb index b4a9a15..a90adab 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb @@ -15,7 +15,7 @@ "given #{arguments.size} for 1") end - begin + begin ip = IPAddr.new(arguments[0]) rescue ArgumentError return false diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb index e8ac8a4..53d54fa 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb @@ -4,7 +4,7 @@ module Puppet::Parser::Functions newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS -This function accepts YAML as a string and converts it into the correct +This function accepts YAML as a string and converts it into the correct Puppet structure. EOS ) do |arguments| diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb index 65c174a..81fadfd 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb @@ -14,9 +14,9 @@ end item = arguments[0] - squeezeval = arguments[1] + squeezeval = arguments[1] - if item.is_a?(Array) then + if item.is_a?(Array) then if squeezeval then item.collect { |i| i.squeeze(squeezeval) } else diff --git a/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb b/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb index c320da6..0509c2b 100644 --- a/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +++ b/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb @@ -4,7 +4,7 @@ module Puppet::Parser::Functions newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS -This converts a string to a boolean. This attempt to convert strings that +This converts a string to a boolean. This attempt to convert strings that contain things like: y, 1, t, true to 'true' and strings that contain things like: 0, f, n, false, no to 'false'. EOS diff --git a/puppet/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb b/puppet/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb index 4eb799d..2577723 100644 --- a/puppet/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb +++ b/puppet/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb @@ -19,7 +19,7 @@ end it "should rotate a string to give the same results for one host" do - scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice + scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice scope.function_fqdn_rotate(["abcdefg"]).should eql(scope.function_fqdn_rotate(["abcdefg"])) end -- To view, visit https://gerrit.wikimedia.org/r/225325 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9da0cc52cf423149f30c149c74cfabfab556ea99 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin <zfili...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits