From: Tom Hughes Date: Wed, 23 May 2018 09:52:01 +0000 (+0100) Subject: Fix rubocop warnings X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/12ef4c375bea3769624567cf93275f4c09d180a4 Fix rubocop warnings --- diff --git a/.rubocop.yml b/.rubocop.yml index 9d9ce40b0..5823b5132 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,12 +21,18 @@ Naming/FileName: - 'hooks/*' - 'roles/*.rb' +Naming/UncommunicativeMethodParamName: + Enabled: false + Style/FrozenStringLiteralComment: EnforcedStyle: never Style/HashSyntax: EnforcedStyle: hash_rockets +Style/IfUnlessModifier: + Enabled: false + Style/StringLiterals: EnforcedStyle: double_quotes diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index 56205f51d..17382e916 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -83,7 +83,7 @@ end # Remove legacy HP G4 support which breaks modern hp-health 10.4 if manufacturer == "HP" - %w[/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 %/usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so].each do |filename| + %w[/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 /usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so].each do |filename| file filename do action :delete manage_symlink_source false diff --git a/cookbooks/kibana/recipes/default.rb b/cookbooks/kibana/recipes/default.rb index aecdfee86..a3c8dc9f9 100644 --- a/cookbooks/kibana/recipes/default.rb +++ b/cookbooks/kibana/recipes/default.rb @@ -83,7 +83,7 @@ node[:kibana][:sites].each do |name, details| "elasticsearch_url" => details[:elasticsearch_url], "pid_file" => "/var/run/kibana/#{name}.pid", "log_file" => "/var/log/kibana/#{name}.log" - )) + )) owner "root" group "root" mode 0o644 diff --git a/cookbooks/mediawiki/resources/site.rb b/cookbooks/mediawiki/resources/site.rb index 351ab9dca..7dc08f6f7 100644 --- a/cookbooks/mediawiki/resources/site.rb +++ b/cookbooks/mediawiki/resources/site.rb @@ -128,7 +128,6 @@ action :create do ruby_block "catch-installer-localsettings-run" do action :run block do - # end not_if do ::File.exist?("#{mediawiki_directory}/LocalSettings-install.php")