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

[COOK-2986] Fix foodcritic warnings #7

Merged
merged 1 commit into from May 17, 2013

Conversation

Projects
None yet
2 participants
@stevendanna
Copy link
Contributor

commented May 14, 2013

  • Use strings rather than symbols
  • Use platform_family
@@ -20,8 +20,8 @@
default["pdns"]["user"] = "pdns"
default["pdns"]["group"] = "pdns"

case platform
when "redhat","centos","fedora"
case platform_family

This comment has been minimized.

Copy link
@jtimberman

jtimberman May 15, 2013

Contributor

We shouldn't use the bare attribute, as that is also a foodcritic finding.

This comment has been minimized.

Copy link
@stevendanna

stevendanna May 15, 2013

Author Contributor

Interestingly it doesn't catch this one.

@@ -33,7 +33,7 @@
end
end

template "#{node[:pdns][:recursor][:config_dir]}/recursor.conf" do
template "#{node["pdns"]["recursor"]["config_dir"]}/recursor.conf" do

This comment has been minimized.

Copy link
@jtimberman

jtimberman May 15, 2013

Contributor

How about single quotes here?

@@ -17,7 +17,7 @@
# limitations under the License.
#

include_recipe "pdns::#{node['pdns']['server_backend']}"
include_recipe "pdns::#{node["pdns"]["server_backend"]}"

This comment has been minimized.

Copy link
@jtimberman

jtimberman May 15, 2013

Contributor

How about keeping the single quotes?

This comment has been minimized.

Copy link
@stevendanna

stevendanna May 15, 2013

Author Contributor

I'm cool making this change but want to understand the preference since I'll be writing up some guidelines for others who want to help with foodcritic work. Double quotes are used in the rest of the file.

This comment has been minimized.

Copy link
@stevendanna

stevendanna May 15, 2013

Author Contributor

Also, I'm very glad someone is actually reviewing these :)

This comment has been minimized.

Copy link
@jtimberman

jtimberman May 15, 2013

Contributor

I read once on the Internet that you should use single quotes inside a string interpolation

[COOK-2986] Fix foodcritic warnings
- Use strings rather than symbols
- Use platform_family
@stevendanna

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2013

I've force-pushed updates addressing the previous comments. Force-pushed since I opened a cookbook-specific bug for this one and wanted to rewrite the git commit message to reflect that.

jtimberman added a commit that referenced this pull request May 17, 2013

Merge pull request #7 from opscode-cookbooks/ssd/CHEF-2914
[COOK-2986] Fix foodcritic warnings

@jtimberman jtimberman merged commit 44c941c into master May 17, 2013

@jtimberman jtimberman deleted the ssd/CHEF-2914 branch May 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.