cookstyle icon indicating copy to clipboard operation
cookstyle copied to clipboard

Detect single line do/end style blocks

Open tas50 opened this issue 3 years ago • 1 comments

execute 'execute-scheduled-karaf-restart' do
  command 'rm -f /tmp/karaf-restart'
  action :run

  notifies :stop, 'service[karaf-deploy-stop]', :immediately
  # notifies cache folders deletion
  $karaf_cache.each do |cache_folder|
    notifies :delete, "directory[#{cache_folder}]", :immediately
  end
  notifies :start, 'service[karaf]', :immediately

  only_if do
    ::File.exist?('/tmp/karaf-restart')
  end
end

The only_if here should just be a single line

tas50 avatar Jan 18 '22 03:01 tas50