acaiafa/opentsdb-cookbook

View on GitHub
libraries/helpers.rb

Summary

Maintainability
A
0 mins
Test Coverage

Prefer conditional attributes
Open

      if node.platform_family == 'rhel'
Severity: Minor
Found in libraries/helpers.rb by foodcritic

This warning means you have surrounded a resource with an if or unless rather than defining the condition directly on the resource itself. Note that this warning is only raised for single resources as you could reasonably enclose multiple resources in a condition like this for brevity.

Jay Feldblum has expressed criticism of this rule because the effect is that resources are defined unnecessarily and ignored only at run-time. His view is that it is cleaner to use standard Ruby conditionals to avoid defining them in the first place.

There are no issues that match your filters.

Category
Status