Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect using run_action on the resource block to force compile_time #899

Open
tas50 opened this issue Sep 2, 2021 · 0 comments
Open

Detect using run_action on the resource block to force compile_time #899

tas50 opened this issue Sep 2, 2021 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@tas50
Copy link
Contributor

tas50 commented Sep 2, 2021

When someone does this

    file tokenpath do
      owner   new_resource.owner
      group   new_resource.group
      mode    '644'
      content authz.file_content
      action  :nothing
    end.run_action(:create)

We should autocorrect to:

    file tokenpath do
      owner   new_resource.owner
      group   new_resource.group
      mode    '644'
      content authz.file_content
      action  :create
      compile_time true
    end
  1. Update action with action from run_action method
  2. Remove run_action method call
  3. Add compile_time true

This would be a modernize cop that requires 16.0

@tas50 tas50 added Type: Bug Does not work as expected. Status: Untriaged An issue that has yet to be triaged. labels Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant