Skip to content

Detect single line do/end style blocks #931

Description

@tas50
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    New Cop ProposalA proposal for a new Cookstyle copStatus: Waiting on ContributorA pull request that has unresolved requested actions from the author.Triage: Feature RequestIndicates an issue requesting new functionality.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions