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

ChefStyle/UsePlatformHelpers autocorrect is wrong #301

Closed
thr3a opened this issue Sep 20, 2019 · 3 comments · Fixed by #303
Closed

ChefStyle/UsePlatformHelpers autocorrect is wrong #301

thr3a opened this issue Sep 20, 2019 · 3 comments · Fixed by #303
Labels
Type: Bug Does not work as expected.

Comments

@thr3a
Copy link

thr3a commented Sep 20, 2019

Version:

5.6.2

Environment:

Any OS

Scenario:

recipe code

if node["platform_family"] == "debian"

end

Execute bundle exec cookstyle -D --auto-correct This result is no problem.

if platform_family?("debian")

end

But, if multiple node["platform_family"] are used in one file

if node["platform_family"] == "debian"

end


if node["platform_family"] == "rhel"

end

Both will be the last value.

if platform_family?("rhel")

end

if platform_family?("rhel")

end

Expected Result:

if platform_family?("debian")

end

if platform_family?("rhel")

end

Actual Result:

if platform_family?("rhel")

end

if platform_family?("rhel")

end
@thr3a thr3a added the Status: Untriaged An issue that has yet to be triaged. label Sep 20, 2019
@tas50 tas50 added Type: Bug Does not work as expected. and removed Status: Untriaged An issue that has yet to be triaged. labels Sep 20, 2019
@tas50
Copy link
Contributor

tas50 commented Sep 20, 2019

Well that's not right. I'll see what I can do.

@tas50
Copy link
Contributor

tas50 commented Oct 2, 2019

Thanks for the report @thr3a. I've fixed this and I'll get a release out hopefully tomorrow

@thr3a
Copy link
Author

thr3a commented Oct 4, 2019

@tas50 Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants