- From: Adam Jacob <
>
- To: "
" <
>
- Cc: "
" <
>
- Subject: [chef] Re: Re: Foodcritic FC003
- Date: Tue, 27 Dec 2011 14:06:38 -0800
Do we have a ticket open to mainline one of those approaches?
Sent from my iPhone
On Dec 27, 2011, at 12:14 PM, Miquel Torres
<
>
wrote:
>
That would also be nicer to users of the chef-solo search lib, and
>
particularly of LittleChef, which *would* be able to run the recipe
>
;-)
>
>
>
2011/12/27 Alex Howells
>
<
>:
>
> http://acrmp.github.com/foodcritic/
>
>
>
> I was just looking at Foodcritic, and wondered about FC003...
>
>
>
> Modified version
>
> This modified example would not match the FC003 rule:
>
>
>
> if Chef::Config[:solo]
>
> Chef::Log.warn("This recipe uses search. Chef Solo does not
>
> support search.")
>
> else
>
> nodes = search(:node, "hostname:[* TO *] AND
>
> chef_environment:#{node.chef_environment}")
>
> end
>
>
>
> Would it not be better to wrap search() globally and emit that
>
> Chef::Log.warn() each time that function is called inside a Solo run,
>
> and not expect each recipe to do the above?
>
>
>
> Cheers,
>
> -Alex
Archive powered by MHonArc 2.6.16.