foodcritic 2.2.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +15 -0
  2. data/CHANGELOG.md +83 -0
  3. data/chef_dsl_metadata/chef_0.10.0.json +2 -3
  4. data/chef_dsl_metadata/chef_0.10.10.json +2 -3
  5. data/chef_dsl_metadata/chef_0.10.2.json +2 -3
  6. data/chef_dsl_metadata/chef_0.10.4.json +2 -3
  7. data/chef_dsl_metadata/chef_0.10.6.json +2 -3
  8. data/chef_dsl_metadata/chef_0.10.8.json +2 -3
  9. data/chef_dsl_metadata/chef_0.8.14.json +2 -3
  10. data/chef_dsl_metadata/chef_0.8.16.json +2 -3
  11. data/chef_dsl_metadata/chef_0.9.0.json +2 -3
  12. data/chef_dsl_metadata/chef_0.9.10.json +2 -3
  13. data/chef_dsl_metadata/chef_0.9.12.json +2 -3
  14. data/chef_dsl_metadata/chef_0.9.14.json +2 -3
  15. data/chef_dsl_metadata/chef_0.9.16.json +2 -3
  16. data/chef_dsl_metadata/chef_0.9.18.json +2 -3
  17. data/chef_dsl_metadata/chef_0.9.2.json +2 -3
  18. data/chef_dsl_metadata/chef_0.9.4.json +2 -3
  19. data/chef_dsl_metadata/chef_0.9.6.json +2 -3
  20. data/chef_dsl_metadata/chef_0.9.8.json +2 -3
  21. data/chef_dsl_metadata/chef_10.12.0.json +2 -3
  22. data/chef_dsl_metadata/chef_10.14.0.json +2 -3
  23. data/chef_dsl_metadata/chef_10.14.2.json +2 -3
  24. data/chef_dsl_metadata/chef_10.14.4.json +2 -3
  25. data/chef_dsl_metadata/chef_10.16.0.json +2 -3
  26. data/chef_dsl_metadata/chef_10.16.2.json +2 -3
  27. data/chef_dsl_metadata/chef_10.16.4.json +2 -3
  28. data/chef_dsl_metadata/chef_10.16.6.json +2 -3
  29. data/chef_dsl_metadata/chef_10.18.0.json +2 -3
  30. data/chef_dsl_metadata/chef_10.18.2.json +2 -3
  31. data/chef_dsl_metadata/chef_10.20.0.json +2 -3
  32. data/chef_dsl_metadata/chef_10.22.0.json +2 -3
  33. data/chef_dsl_metadata/chef_10.24.0.json +2 -3
  34. data/chef_dsl_metadata/chef_10.24.4.json +2 -3
  35. data/chef_dsl_metadata/chef_10.26.0.json +2 -3
  36. data/chef_dsl_metadata/chef_11.0.0.json +2 -3
  37. data/chef_dsl_metadata/chef_11.2.0.json +2 -3
  38. data/chef_dsl_metadata/chef_11.4.0.json +2 -3
  39. data/chef_dsl_metadata/chef_11.4.2.json +2 -3
  40. data/chef_dsl_metadata/chef_11.4.4.json +2 -3
  41. data/chef_dsl_metadata/chef_11.6.0.json +9734 -0
  42. data/features/007_check_for_undeclared_recipe_dependencies.feature +18 -34
  43. data/features/017_check_for_no_lwrp_notifications.feature +25 -0
  44. data/features/019_check_for_consistent_node_access.feature +1 -0
  45. data/features/033_check_for_missing_template.feature +20 -64
  46. data/features/034_check_for_unused_template_variables.feature +44 -0
  47. data/features/047_check_for_attribute_assignment_without_precedence.feature +47 -0
  48. data/features/048_check_for_shellout.feature +34 -0
  49. data/features/049_check_for_role_name_mismatch_with_file_name.feature +31 -0
  50. data/features/050_check_for_invalid_name.feature +33 -0
  51. data/features/051_check_for_template_partial_loops.feature +21 -0
  52. data/features/command_line_help.feature +15 -0
  53. data/features/ignore_via_line_comments.feature +18 -0
  54. data/features/individual_file.feature +17 -1
  55. data/features/multiple_paths.feature +26 -2
  56. data/features/step_definitions/cookbook_steps.rb +328 -9
  57. data/features/support/command_helpers.rb +71 -10
  58. data/features/support/cookbook_helpers.rb +88 -6
  59. data/lib/foodcritic/api.rb +89 -20
  60. data/lib/foodcritic/command_line.rb +64 -18
  61. data/lib/foodcritic/domain.rb +26 -7
  62. data/lib/foodcritic/dsl.rb +3 -0
  63. data/lib/foodcritic/linter.rb +93 -61
  64. data/lib/foodcritic/rake_task.rb +3 -2
  65. data/lib/foodcritic/rules.rb +105 -14
  66. data/lib/foodcritic/template.rb +34 -1
  67. data/lib/foodcritic/version.rb +1 -1
  68. data/man/foodcritic.1 +13 -1
  69. data/man/foodcritic.1.ronn +9 -0
  70. data/spec/foodcritic/api_spec.rb +210 -1
  71. data/spec/foodcritic/command_line_spec.rb +13 -0
  72. data/spec/foodcritic/domain_spec.rb +40 -5
  73. data/spec/foodcritic/linter_spec.rb +19 -22
  74. data/spec/foodcritic/template_spec.rb +8 -4
  75. data/spec/regression/expected-output.txt +139 -60
  76. metadata +31 -26
@@ -23,6 +23,19 @@ describe FoodCritic::CommandLine do
23
23
  end
24
24
  end
25
25
 
26
+ describe "#role_paths" do
27
+ it "returns an empty if no role paths are specified" do
28
+ FoodCritic::CommandLine.new([]).role_paths.must_be_empty
29
+ end
30
+ it "returns the provided role path" do
31
+ FoodCritic::CommandLine.new(['-R', 'roles']).role_paths.must_equal(%w{roles})
32
+ end
33
+ it "returns the provided role paths when there are multiple" do
34
+ FoodCritic::CommandLine.new(['-R', 'roles1',
35
+ '-R', 'roles2']).role_paths.must_equal(%w{roles1 roles2})
36
+ end
37
+ end
38
+
26
39
  describe "#valid_paths?" do
27
40
  it "returns false if no paths are specified" do
28
41
  refute FoodCritic::CommandLine.new([]).valid_paths?
@@ -2,23 +2,58 @@ require_relative '../spec_helper'
2
2
 
3
3
  describe FoodCritic::Review do
4
4
  it "is instantiable with no warnings" do
5
- FoodCritic::Review.new('example', [], false)
5
+ FoodCritic::Review.new('example', [])
6
6
  end
7
7
  describe "#cookbook_paths" do
8
8
  it "returns the cookbook paths provided" do
9
- FoodCritic::Review.new(['example'], [], false).cookbook_paths.must_equal ['example']
9
+ FoodCritic::Review.new(['example'], []).cookbook_paths.must_equal ['example']
10
10
  end
11
11
  it "returns the cookbook paths provided when there are multiple" do
12
- FoodCritic::Review.new(['example', 'example2'], [], false).cookbook_paths.must_equal ['example', 'example2']
12
+ FoodCritic::Review.new(['example', 'example2'], []).cookbook_paths.must_equal ['example', 'example2']
13
13
  end
14
14
  end
15
15
  describe "#warnings" do
16
16
  it "returns empty when there are no warnings" do
17
- FoodCritic::Review.new('example', [], false).warnings.must_be_empty
17
+ FoodCritic::Review.new('example', []).warnings.must_be_empty
18
18
  end
19
19
  it "makes the warnings available" do
20
20
  warning = 'Danger Will Robinson'
21
- FoodCritic::Review.new('example', [warning], false).warnings.must_equal [warning]
21
+ FoodCritic::Review.new('example', [warning]).warnings.must_equal [warning]
22
+ end
23
+ end
24
+ end
25
+
26
+ describe FoodCritic::Rule do
27
+ let(:rule) { FoodCritic::Rule.new('FCTEST001', 'Test rule') }
28
+
29
+ describe '#matches_tags?' do
30
+ it "matches the rule's code" do
31
+ rule.matches_tags?(['FCTEST001']).must_equal true
32
+ end
33
+
34
+ it "doesn't match an unrelated code" do
35
+ rule.matches_tags?(['FCTEST999']).must_equal false
36
+ end
37
+ end
38
+
39
+ describe '#tags' do
40
+ it "returns any + the rule's code" do
41
+ rule.tags.must_equal ['any', 'FCTEST001']
42
+ end
43
+ end
44
+ end
45
+
46
+ describe FoodCritic::Warning do
47
+ let(:rule) { FoodCritic::Rule.new('FCTEST001', 'Test rule') }
48
+ let(:match_opts) { {:filename => 'foo/recipes.default.rb', :line => 5, :column=> 40} }
49
+
50
+ describe "failure indication" do
51
+ it 'is false if no fail_tags match' do
52
+ FoodCritic::Warning.new(rule, match_opts, {:fail_tags => []}).failed?.must_equal false
53
+ end
54
+
55
+ it 'is true if fail_tags do match' do
56
+ FoodCritic::Warning.new(rule, match_opts, {:fail_tags => ['any']}).failed?.must_equal true
22
57
  end
23
58
  end
24
59
  end
@@ -7,10 +7,6 @@ describe FoodCritic::Linter do
7
7
  it "is instantiable" do
8
8
  linter.wont_be_nil
9
9
  end
10
-
11
- it "raises if a cookbook path is not provided" do
12
- lambda {linter.check(nil, {})}.must_raise(ArgumentError)
13
- end
14
10
  end
15
11
 
16
12
  describe "chef version" do
@@ -20,29 +16,30 @@ describe FoodCritic::Linter do
20
16
  end
21
17
 
22
18
  describe "#check" do
23
- it "requires a cookbook_path to be provided" do
24
- lambda{ linter.check(nil, {}) }.must_raise ArgumentError
25
- end
26
-
27
- it "requires an array of cookbook paths not to be empty" do
28
- lambda{ linter.check([], {}) }.must_raise ArgumentError
29
- end
30
-
31
- it "accepts a scalar with a single cookbook path for backwards compatibility" do
32
- linter.check('.', {})
33
- end
34
19
 
35
- it "accepts an array of cookbook paths" do
36
- linter.check(['.'], {})
20
+ it "requires a cookbook_path, role_path or environment_path to be specified" do
21
+ lambda{ linter.check({}) }.must_raise ArgumentError
37
22
  end
38
23
 
39
- it "returns a review" do
40
- linter.check(['.'], {}).must_respond_to(:warnings)
24
+ [:cookbook, :role, :environment].each do |path_type|
25
+ key = "#{path_type}_paths".to_sym
26
+ it "requires a #{path_type}_path by itself not to be nil" do
27
+ lambda{ linter.check(key => nil) }.must_raise ArgumentError
28
+ end
29
+ it "requires a #{path_type}_path by itself not to be empty" do
30
+ lambda{ linter.check(key => []) }.must_raise ArgumentError
31
+ end
32
+ it "accepts a scalar with a single #{path_type} path" do
33
+ linter.check(key => '.')
34
+ end
35
+ it "accepts an array of #{path_type} paths" do
36
+ linter.check(key => ['.'])
37
+ end
38
+ it "returns a review when a #{path_type} path is provided" do
39
+ linter.check(key => ['.']).must_respond_to(:warnings)
40
+ end
41
41
  end
42
42
 
43
- it "does not require an empty hash of options" do
44
- linter.check(['.'])
45
- end
46
43
  end
47
44
 
48
45
  describe "#load_files!" do
@@ -16,7 +16,8 @@ describe FoodCritic::Template::ExpressionExtractor do
16
16
  <% if true %>
17
17
  Hello World!
18
18
  <% end %>
19
- }).must_equal([{:type => :statement, :code => 'if true'}, {:type => :statement, :code => 'end'}])
19
+ }).must_equal([{:type => :statement, :code => 'if true', :line => 2},
20
+ {:type => :statement, :code => 'end', :line => 4}])
20
21
  end
21
22
  it "does not evaluate erb statements" do
22
23
  extractor.extract(%q{
@@ -26,7 +27,7 @@ describe FoodCritic::Template::ExpressionExtractor do
26
27
  it "extracts an expression from within the template" do
27
28
  extractor.extract(%q{
28
29
  <%= foo %>
29
- }).must_equal([{:type => :expression, :code => 'foo'}])
30
+ }).must_equal([{:type => :expression, :code => 'foo', :line => 2}])
30
31
  end
31
32
  it "does not evaluate erb expressions" do
32
33
  extractor.extract(%q{
@@ -40,10 +41,13 @@ describe FoodCritic::Template::ExpressionExtractor do
40
41
  URIEncoding="UTF-8"
41
42
  redirectPort="<%= node["tomcat"]["ssl_port"] %>" />
42
43
  }).must_equal([
43
- {:type => :expression, :code => 'node["tomcat"]["port"]'},
44
- {:type => :expression, :code => 'node["tomcat"]["ssl_port"]'}
44
+ {:type => :expression, :code => 'node["tomcat"]["port"]', :line => 2},
45
+ {:type => :expression, :code => 'node["tomcat"]["ssl_port"]', :line => 5}
45
46
  ])
46
47
  end
48
+ it "excludes comment-only expressions" do
49
+ extractor.extract('<%# A comment %>').must_be_empty
50
+ end
47
51
  end
48
52
 
49
53
  end
@@ -1,5 +1,5 @@
1
1
  FC002: Avoid string interpolation where not required: ./ant/resources/library.rb:29
2
- FC002: Avoid string interpolation where not required: ./application_php/templates/default/php.conf.erb:1
2
+ FC002: Avoid string interpolation where not required: ./application_php/templates/default/php.conf.erb:3
3
3
  FC002: Avoid string interpolation where not required: ./application_python/providers/gunicorn.rb:80
4
4
  FC002: Avoid string interpolation where not required: ./ark/libraries/provider_ark.rb:247
5
5
  FC002: Avoid string interpolation where not required: ./ark/libraries/provider_ark.rb:249
@@ -21,8 +21,8 @@ FC002: Avoid string interpolation where not required: ./pacman/providers/aur.rb:
21
21
  FC002: Avoid string interpolation where not required: ./pacman/providers/aur.rb:31
22
22
  FC002: Avoid string interpolation where not required: ./pacman/providers/aur.rb:72
23
23
  FC002: Avoid string interpolation where not required: ./pacman/providers/aur.rb:90
24
- FC002: Avoid string interpolation where not required: ./passenger_apache2/templates/default/passenger_web_app.conf.erb:1
25
- FC002: Avoid string interpolation where not required: ./passenger_apache2/templates/default/web_app.conf.erb:1
24
+ FC002: Avoid string interpolation where not required: ./passenger_apache2/templates/default/passenger_web_app.conf.erb:3
25
+ FC002: Avoid string interpolation where not required: ./passenger_apache2/templates/default/web_app.conf.erb:3
26
26
  FC002: Avoid string interpolation where not required: ./perl/recipes/default.rb:37
27
27
  FC002: Avoid string interpolation where not required: ./perl/recipes/default.rb:43
28
28
  FC002: Avoid string interpolation where not required: ./pxe_dust/recipes/bootstrap_template.rb:89
@@ -35,7 +35,7 @@ FC002: Avoid string interpolation where not required: ./python/providers/virtual
35
35
  FC002: Avoid string interpolation where not required: ./python/providers/virtualenv.rb:64
36
36
  FC002: Avoid string interpolation where not required: ./radiant/recipes/default.rb:57
37
37
  FC002: Avoid string interpolation where not required: ./radiant/recipes/default.rb:61
38
- FC002: Avoid string interpolation where not required: ./radiant/templates/default/radiant.conf.erb:1
38
+ FC002: Avoid string interpolation where not required: ./radiant/templates/default/radiant.conf.erb:3
39
39
  FC002: Avoid string interpolation where not required: ./rsyslog/recipes/default.rb:24
40
40
  FC002: Avoid string interpolation where not required: ./rsyslog/recipes/default.rb:63
41
41
  FC002: Avoid string interpolation where not required: ./sbuild/definitions/sbuild_lv.rb:30
@@ -45,7 +45,7 @@ FC002: Avoid string interpolation where not required: ./windows/libraries/window
45
45
  FC002: Avoid string interpolation where not required: ./windows/libraries/windows_privileged.rb:56
46
46
  FC002: Avoid string interpolation where not required: ./wordpress/recipes/default.rb:66
47
47
  FC002: Avoid string interpolation where not required: ./wordpress/recipes/default.rb:148
48
- FC002: Avoid string interpolation where not required: ./wordpress/templates/default/wordpress.conf.erb:1
48
+ FC002: Avoid string interpolation where not required: ./wordpress/templates/default/wordpress.conf.erb:3
49
49
  FC002: Avoid string interpolation where not required: ./zenoss/providers/zendmd.rb:4
50
50
  FC002: Avoid string interpolation where not required: ./zenoss/recipes/server.rb:164
51
51
  FC003: Check whether you are running with chef server before using server-specific features: ./application/libraries/default.rb:97
@@ -146,57 +146,126 @@ FC016: LWRP does not declare a default action: ./zenoss/resources/zenbatchload.r
146
146
  FC016: LWRP does not declare a default action: ./zenoss/resources/zendmd.rb:1
147
147
  FC016: LWRP does not declare a default action: ./zenoss/resources/zenpack.rb:1
148
148
  FC016: LWRP does not declare a default action: ./zenoss/resources/zenpatch.rb:1
149
- FC017: LWRP does not notify when updated: ./application/providers/default.rb:1
150
- FC017: LWRP does not notify when updated: ./application_java/providers/java_webapp.rb:1
151
- FC017: LWRP does not notify when updated: ./application_java/providers/tomcat.rb:1
152
- FC017: LWRP does not notify when updated: ./application_nginx/providers/nginx_load_balancer.rb:1
153
- FC017: LWRP does not notify when updated: ./application_php/providers/mod_php_apache2.rb:1
154
- FC017: LWRP does not notify when updated: ./application_php/providers/php.rb:1
155
- FC017: LWRP does not notify when updated: ./application_python/providers/celery.rb:1
156
- FC017: LWRP does not notify when updated: ./application_python/providers/django.rb:1
157
- FC017: LWRP does not notify when updated: ./application_python/providers/gunicorn.rb:1
158
- FC017: LWRP does not notify when updated: ./application_ruby/providers/memcached.rb:1
159
- FC017: LWRP does not notify when updated: ./application_ruby/providers/passenger_apache2.rb:1
160
- FC017: LWRP does not notify when updated: ./application_ruby/providers/rails.rb:1
161
- FC017: LWRP does not notify when updated: ./application_ruby/providers/unicorn.rb:1
162
- FC017: LWRP does not notify when updated: ./aws/providers/ebs_volume.rb:1
163
- FC017: LWRP does not notify when updated: ./aws/providers/elastic_ip.rb:1
164
- FC017: LWRP does not notify when updated: ./aws/providers/elastic_lb.rb:1
165
- FC017: LWRP does not notify when updated: ./aws/providers/resource_tag.rb:1
166
- FC017: LWRP does not notify when updated: ./chef_handler/providers/default.rb:1
167
- FC017: LWRP does not notify when updated: ./dmg/providers/package.rb:1
168
- FC017: LWRP does not notify when updated: ./heartbeat/providers/default.rb:1
169
- FC017: LWRP does not notify when updated: ./heartbeat/providers/null.rb:1
170
- FC017: LWRP does not notify when updated: ./homebrew/providers/tap.rb:1
171
- FC017: LWRP does not notify when updated: ./iis/providers/app.rb:1
172
- FC017: LWRP does not notify when updated: ./iis/providers/config.rb:1
173
- FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:1
174
- FC017: LWRP does not notify when updated: ./iis/providers/site.rb:1
175
- FC017: LWRP does not notify when updated: ./java/providers/ark.rb:1
176
- FC017: LWRP does not notify when updated: ./lvm/providers/physical_volume.rb:1
177
- FC017: LWRP does not notify when updated: ./pacman/providers/aur.rb:1
178
- FC017: LWRP does not notify when updated: ./php/providers/pear.rb:1
179
- FC017: LWRP does not notify when updated: ./php/providers/pear_channel.rb:1
180
- FC017: LWRP does not notify when updated: ./powershell/providers/default.rb:1
181
- FC017: LWRP does not notify when updated: ./python/providers/pip.rb:1
182
- FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:1
183
- FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:1
184
- FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:1
185
- FC017: LWRP does not notify when updated: ./webpi/providers/product.rb:1
186
- FC017: LWRP does not notify when updated: ./windows/providers/auto_run.rb:1
187
- FC017: LWRP does not notify when updated: ./windows/providers/batch.rb:1
188
- FC017: LWRP does not notify when updated: ./windows/providers/feature_dism.rb:1
189
- FC017: LWRP does not notify when updated: ./windows/providers/feature_servermanagercmd.rb:1
190
- FC017: LWRP does not notify when updated: ./windows/providers/package.rb:1
191
- FC017: LWRP does not notify when updated: ./windows/providers/pagefile.rb:1
192
- FC017: LWRP does not notify when updated: ./windows/providers/path.rb:1
193
- FC017: LWRP does not notify when updated: ./windows/providers/reboot.rb:1
194
- FC017: LWRP does not notify when updated: ./windows/providers/registry.rb:1
195
- FC017: LWRP does not notify when updated: ./windows/providers/shortcut.rb:1
196
- FC017: LWRP does not notify when updated: ./windows/providers/task.rb:1
197
- FC017: LWRP does not notify when updated: ./windows/providers/zipfile.rb:1
198
- FC017: LWRP does not notify when updated: ./zenoss/providers/zenbatchload.rb:1
199
- FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:1
149
+ FC017: LWRP does not notify when updated: ./application/providers/default.rb:23
150
+ FC017: LWRP does not notify when updated: ./application/providers/default.rb:33
151
+ FC017: LWRP does not notify when updated: ./application/providers/default.rb:43
152
+ FC017: LWRP does not notify when updated: ./application_java/providers/java_webapp.rb:25
153
+ FC017: LWRP does not notify when updated: ./application_java/providers/tomcat.rb:22
154
+ FC017: LWRP does not notify when updated: ./application_java/providers/tomcat.rb:34
155
+ FC017: LWRP does not notify when updated: ./application_nginx/providers/nginx_load_balancer.rb:23
156
+ FC017: LWRP does not notify when updated: ./application_nginx/providers/nginx_load_balancer.rb:37
157
+ FC017: LWRP does not notify when updated: ./application_php/providers/mod_php_apache2.rb:22
158
+ FC017: LWRP does not notify when updated: ./application_php/providers/mod_php_apache2.rb:46
159
+ FC017: LWRP does not notify when updated: ./application_php/providers/php.rb:22
160
+ FC017: LWRP does not notify when updated: ./application_php/providers/php.rb:31
161
+ FC017: LWRP does not notify when updated: ./application_python/providers/celery.rb:23
162
+ FC017: LWRP does not notify when updated: ./application_python/providers/celery.rb:50
163
+ FC017: LWRP does not notify when updated: ./application_python/providers/django.rb:25
164
+ FC017: LWRP does not notify when updated: ./application_python/providers/django.rb:36
165
+ FC017: LWRP does not notify when updated: ./application_python/providers/django.rb:44
166
+ FC017: LWRP does not notify when updated: ./application_python/providers/django.rb:70
167
+ FC017: LWRP does not notify when updated: ./application_python/providers/gunicorn.rb:25
168
+ FC017: LWRP does not notify when updated: ./application_python/providers/gunicorn.rb:46
169
+ FC017: LWRP does not notify when updated: ./application_python/providers/gunicorn.rb:91
170
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/memcached.rb:20
171
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/memcached.rb:26
172
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/passenger_apache2.rb:22
173
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/passenger_apache2.rb:40
174
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/rails.rb:21
175
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/rails.rb:44
176
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/rails.rb:54
177
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/rails.rb:108
178
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/unicorn.rb:23
179
+ FC017: LWRP does not notify when updated: ./application_ruby/providers/unicorn.rb:54
180
+ FC017: LWRP does not notify when updated: ./apt/providers/repository.rb:124
181
+ FC017: LWRP does not notify when updated: ./cron/providers/d.rb:1
182
+ FC017: LWRP does not notify when updated: ./dmg/providers/package.rb:27
183
+ FC017: LWRP does not notify when updated: ./firewall/providers/rule_ufw.rb:23
184
+ FC017: LWRP does not notify when updated: ./firewall/providers/rule_ufw.rb:27
185
+ FC017: LWRP does not notify when updated: ./firewall/providers/rule_ufw.rb:31
186
+ FC017: LWRP does not notify when updated: ./heartbeat/providers/default.rb:20
187
+ FC017: LWRP does not notify when updated: ./homebrew/providers/tap.rb:13
188
+ FC017: LWRP does not notify when updated: ./homebrew/providers/tap.rb:21
189
+ FC017: LWRP does not notify when updated: ./iis/providers/app.rb:26
190
+ FC017: LWRP does not notify when updated: ./iis/providers/app.rb:40
191
+ FC017: LWRP does not notify when updated: ./iis/providers/app.rb:57
192
+ FC017: LWRP does not notify when updated: ./iis/providers/config.rb:27
193
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:27
194
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:41
195
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:68
196
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:78
197
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:88
198
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:98
199
+ FC017: LWRP does not notify when updated: ./iis/providers/pool.rb:106
200
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:26
201
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:50
202
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:84
203
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:94
204
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:104
205
+ FC017: LWRP does not notify when updated: ./iis/providers/site.rb:114
206
+ FC017: LWRP does not notify when updated: ./lvm/providers/physical_volume.rb:6
207
+ FC017: LWRP does not notify when updated: ./maven/providers/default.rb:61
208
+ FC017: LWRP does not notify when updated: ./maven/providers/default.rb:65
209
+ FC017: LWRP does not notify when updated: ./pacman/providers/aur.rb:24
210
+ FC017: LWRP does not notify when updated: ./pacman/providers/aur.rb:98
211
+ FC017: LWRP does not notify when updated: ./php/providers/pear_channel.rb:31
212
+ FC017: LWRP does not notify when updated: ./php/providers/pear_channel.rb:40
213
+ FC017: LWRP does not notify when updated: ./php/providers/pear_channel.rb:69
214
+ FC017: LWRP does not notify when updated: ./powershell/providers/default.rb:19
215
+ FC017: LWRP does not notify when updated: ./rsync/providers/serve.rb:65
216
+ FC017: LWRP does not notify when updated: ./rsync/providers/serve.rb:69
217
+ FC017: LWRP does not notify when updated: ./sudo/providers/default.rb:102
218
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:21
219
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:38
220
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:50
221
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:56
222
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:62
223
+ FC017: LWRP does not notify when updated: ./supervisor/providers/fcgi.rb:68
224
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:21
225
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:38
226
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:50
227
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:56
228
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:62
229
+ FC017: LWRP does not notify when updated: ./supervisor/providers/group.rb:68
230
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:21
231
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:38
232
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:50
233
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:56
234
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:62
235
+ FC017: LWRP does not notify when updated: ./supervisor/providers/service.rb:68
236
+ FC017: LWRP does not notify when updated: ./webpi/providers/product.rb:26
237
+ FC017: LWRP does not notify when updated: ./windows/providers/auto_run.rb:21
238
+ FC017: LWRP does not notify when updated: ./windows/providers/auto_run.rb:27
239
+ FC017: LWRP does not notify when updated: ./windows/providers/batch.rb:24
240
+ FC017: LWRP does not notify when updated: ./windows/providers/package.rb:35
241
+ FC017: LWRP does not notify when updated: ./windows/providers/package.rb:53
242
+ FC017: LWRP does not notify when updated: ./windows/providers/package.rb:64
243
+ FC017: LWRP does not notify when updated: ./windows/providers/pagefile.rb:24
244
+ FC017: LWRP does not notify when updated: ./windows/providers/pagefile.rb:66
245
+ FC017: LWRP does not notify when updated: ./windows/providers/path.rb:21
246
+ FC017: LWRP does not notify when updated: ./windows/providers/path.rb:29
247
+ FC017: LWRP does not notify when updated: ./windows/providers/reboot.rb:21
248
+ FC017: LWRP does not notify when updated: ./windows/providers/reboot.rb:27
249
+ FC017: LWRP does not notify when updated: ./windows/providers/registry.rb:27
250
+ FC017: LWRP does not notify when updated: ./windows/providers/registry.rb:31
251
+ FC017: LWRP does not notify when updated: ./windows/providers/registry.rb:35
252
+ FC017: LWRP does not notify when updated: ./windows/providers/registry.rb:61
253
+ FC017: LWRP does not notify when updated: ./windows/providers/task.rb:24
254
+ FC017: LWRP does not notify when updated: ./windows/providers/task.rb:43
255
+ FC017: LWRP does not notify when updated: ./windows/providers/task.rb:58
256
+ FC017: LWRP does not notify when updated: ./windows/providers/task.rb:75
257
+ FC017: LWRP does not notify when updated: ./windows/providers/zipfile.rb:27
258
+ FC017: LWRP does not notify when updated: ./windows/providers/zipfile.rb:44
259
+ FC017: LWRP does not notify when updated: ./yum/providers/key.rb:25
260
+ FC017: LWRP does not notify when updated: ./yum/providers/repository.rb:28
261
+ FC017: LWRP does not notify when updated: ./yum/providers/repository.rb:45
262
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zenbatchload.rb:2
263
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:2
264
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:33
265
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:63
266
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:77
267
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:88
268
+ FC017: LWRP does not notify when updated: ./zenoss/providers/zendmd.rb:97
200
269
  FC017: LWRP does not notify when updated: ./zenoss/providers/zenpatch.rb:1
201
270
  FC018: LWRP uses deprecated notification syntax: ./pacman/providers/aur.rb:94
202
271
  FC018: LWRP uses deprecated notification syntax: ./pacman/providers/aur.rb:104
@@ -277,9 +346,6 @@ FC019: Access node attributes in a consistent manner: runit/definitions/runit_se
277
346
  FC019: Access node attributes in a consistent manner: trac/recipes/default.rb:53
278
347
  FC019: Access node attributes in a consistent manner: ufw/attributes/default.rb:1
279
348
  FC019: Access node attributes in a consistent manner: ufw/attributes/default.rb:2
280
- FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:22
281
- FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:23
282
- FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:24
283
349
  FC019: Access node attributes in a consistent manner: zenoss/attributes/default.rb:33
284
350
  FC019: Access node attributes in a consistent manner: zenoss/recipes/server.rb:62
285
351
  FC019: Access node attributes in a consistent manner: zenoss/recipes/server.rb:86
@@ -332,7 +398,6 @@ FC034: Unused template variables: ./horizon/templates/default/local_settings.py.
332
398
  FC034: Unused template variables: ./nginx/templates/default/nginx.init.erb:1
333
399
  FC034: Unused template variables: ./nova/templates/default/libvirtd.conf.erb:1
334
400
  FC034: Unused template variables: ./sbuild/templates/default/mk_chroot.sh.erb:1
335
- FC037: Invalid notification action: ./wordpress/recipes/default.rb:125
336
401
  FC041: Execute resource used to run curl or wget commands: ./hadoop/recipes/default.rb:33
337
402
  FC042: Prefer include_recipe to require_recipe: ./postfix/recipes/aliases.rb:17
338
403
  FC043: Prefer new notification syntax: ./apache2/definitions/apache_module.rb:20
@@ -441,3 +506,17 @@ FC043: Prefer new notification syntax: ./zenoss/recipes/server.rb:155
441
506
  FC043: Prefer new notification syntax: ./zenoss/recipes/server.rb:164
442
507
  FC044: Avoid bare attribute keys: ./resolver/attributes/default.rb:20
443
508
  FC045: Consider setting cookbook name in metadata: ./maven/metadata.rb:1
509
+ FC047: Attribute assignment does not specify precedence: ./jetty/recipes/cargo.rb:35
510
+ FC047: Attribute assignment does not specify precedence: ./munin/recipes/server_apache.rb:1
511
+ FC047: Attribute assignment does not specify precedence: ./python/recipes/package.rb:28
512
+ FC047: Attribute assignment does not specify precedence: ./users/providers/manage.rb:55
513
+ FC048: Prefer Mixlib::ShellOut: ./apt/providers/repository.rb:26
514
+ FC048: Prefer Mixlib::ShellOut: ./chef-client/recipes/cron.rb:38
515
+ FC048: Prefer Mixlib::ShellOut: ./chef-client/recipes/delete_validation.rb:20
516
+ FC048: Prefer Mixlib::ShellOut: ./chef-client/recipes/service.rb:52
517
+ FC048: Prefer Mixlib::ShellOut: ./chef-client/recipes/task.rb:42
518
+ FC048: Prefer Mixlib::ShellOut: ./dmg/providers/package.rb:44
519
+ FC048: Prefer Mixlib::ShellOut: ./dmg/providers/package.rb:47
520
+ FC048: Prefer Mixlib::ShellOut: ./dmg/providers/package.rb:76
521
+ FC048: Prefer Mixlib::ShellOut: ./nginx/recipes/passenger.rb:20
522
+ FC048: Prefer Mixlib::ShellOut: ./windows/providers/task.rb:106
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foodcritic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
5
- prerelease:
4
+ version: 3.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andrew Crump
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-10 00:00:00.000000000 Z
11
+ date: 2013-09-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: gherkin
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: nokogiri
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,15 +34,27 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.5.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 10.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 10.1.0
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: treetop
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
59
  - - ~>
52
60
  - !ruby/object:Gem::Version
@@ -54,7 +62,6 @@ dependencies:
54
62
  type: :runtime
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
66
  - - ~>
60
67
  - !ruby/object:Gem::Version
@@ -62,7 +69,6 @@ dependencies:
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: yajl-ruby
64
71
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
72
  requirements:
67
73
  - - ~>
68
74
  - !ruby/object:Gem::Version
@@ -70,7 +76,6 @@ dependencies:
70
76
  type: :runtime
71
77
  prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
79
  requirements:
75
80
  - - ~>
76
81
  - !ruby/object:Gem::Version
@@ -78,17 +83,15 @@ dependencies:
78
83
  - !ruby/object:Gem::Dependency
79
84
  name: erubis
80
85
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
86
  requirements:
83
- - - '>='
87
+ - - ! '>='
84
88
  - !ruby/object:Gem::Version
85
89
  version: '0'
86
90
  type: :runtime
87
91
  prerelease: false
88
92
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
93
  requirements:
91
- - - '>='
94
+ - - ! '>='
92
95
  - !ruby/object:Gem::Version
93
96
  version: '0'
94
97
  description: Lint tool for Opscode Chef cookbooks.
@@ -131,6 +134,7 @@ files:
131
134
  - chef_dsl_metadata/chef_0.10.0.json
132
135
  - chef_dsl_metadata/chef_10.16.2.json
133
136
  - chef_dsl_metadata/chef_10.24.0.json
137
+ - chef_dsl_metadata/chef_11.6.0.json
134
138
  - chef_dsl_metadata/chef_10.24.4.json
135
139
  - chef_dsl_metadata/chef_10.14.2.json
136
140
  - chef_dsl_metadata/chef_10.14.0.json
@@ -168,11 +172,13 @@ files:
168
172
  - features/choose_rules_to_apply.feature
169
173
  - features/030_check_for_debugger_breakpoints.feature
170
174
  - features/006_check_file_mode.feature
175
+ - features/050_check_for_invalid_name.feature
171
176
  - features/029_check_for_no_leading_cookbook_name.feature
172
177
  - features/include_custom_rules.feature
173
178
  - features/031_check_for_metadata_existence.feature
174
179
  - features/checking_all_types_of_file.feature
175
180
  - features/021_check_for_dodgy_lwrp_conditions.feature
181
+ - features/051_check_for_template_partial_loops.feature
176
182
  - features/015_check_for_definitions.feature
177
183
  - features/041_check_raw_download.feature
178
184
  - features/individual_file.feature
@@ -210,7 +216,9 @@ files:
210
216
  - features/042_check_for_deprecated_require_recipe.feature
211
217
  - features/024_check_for_missing_platforms.feature
212
218
  - features/command_line_help.feature
219
+ - features/049_check_for_role_name_mismatch_with_file_name.feature
213
220
  - features/013_check_for_hardcoded_tmpdir.feature
221
+ - features/047_check_for_attribute_assignment_without_precedence.feature
214
222
  - features/011_check_for_markdown_readme.feature
215
223
  - features/specify_search_grammar.feature
216
224
  - features/019_check_for_consistent_node_access.feature
@@ -219,6 +227,7 @@ files:
219
227
  - features/ignore_via_line_comments.feature
220
228
  - features/016_check_for_no_lwrp_default_action.feature
221
229
  - features/033_check_for_missing_template.feature
230
+ - features/048_check_for_shellout.feature
222
231
  - features/040_check_raw_git_usage.feature
223
232
  - features/009_check_for_unrecognised_resource_attributes.feature
224
233
  - features/build_framework_support.feature
@@ -228,32 +237,28 @@ files:
228
237
  - LICENSE
229
238
  - man/foodcritic.1.ronn
230
239
  - man/foodcritic.1
231
- homepage: http://acrmp.github.com/foodcritic
240
+ homepage: http://foodcritic.io
232
241
  licenses:
233
242
  - MIT
243
+ metadata: {}
234
244
  post_install_message:
235
245
  rdoc_options: []
236
246
  require_paths:
237
247
  - lib
238
248
  required_ruby_version: !ruby/object:Gem::Requirement
239
- none: false
240
249
  requirements:
241
- - - '>='
250
+ - - ! '>='
242
251
  - !ruby/object:Gem::Version
243
252
  version: 1.9.2
244
253
  required_rubygems_version: !ruby/object:Gem::Requirement
245
- none: false
246
254
  requirements:
247
- - - '>='
255
+ - - ! '>='
248
256
  - !ruby/object:Gem::Version
249
257
  version: '0'
250
- segments:
251
- - 0
252
- hash: 2951702180016458639
253
258
  requirements: []
254
259
  rubyforge_project:
255
- rubygems_version: 1.8.25
260
+ rubygems_version: 2.0.7
256
261
  signing_key:
257
- specification_version: 3
258
- summary: foodcritic-2.2.0
262
+ specification_version: 4
263
+ summary: foodcritic-3.0.0
259
264
  test_files: []