foodcritic 13.1.1 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/chef_dsl_metadata/chef_13.4.19.json +0 -212
- data/chef_dsl_metadata/chef_13.5.3.json +0 -212
- data/chef_dsl_metadata/chef_13.6.0.json +0 -212
- data/chef_dsl_metadata/chef_13.7.16.json +0 -212
- data/chef_dsl_metadata/{chef_13.3.42.json → chef_13.9.1.json} +189 -48
- data/chef_dsl_metadata/{chef_13.1.31.json → chef_14.1.12.json} +8735 -1444
- data/chef_dsl_metadata/{chef_13.0.113.json → chef_14.2.0.json} +8763 -1432
- data/features/continuous_integration_support.feature +0 -2
- data/features/step_definitions/cookbook_steps.rb +0 -26
- data/features/support/command_helpers.rb +0 -2
- data/lib/foodcritic/api.rb +6 -1
- data/lib/foodcritic/linter.rb +1 -1
- data/lib/foodcritic/rules/fc048.rb +1 -1
- data/lib/foodcritic/rules/fc069.rb +145 -115
- data/lib/foodcritic/rules/fc071.rb +1 -1
- data/lib/foodcritic/rules/fc078.rb +54 -48
- data/lib/foodcritic/rules/fc121.rb +6 -0
- data/lib/foodcritic/version.rb +1 -1
- data/spec/functional/fc009_spec.rb +6 -6
- data/spec/functional/fc040_spec.rb +156 -0
- data/spec/functional/fc041_spec.rb +121 -0
- data/spec/functional/fc048_spec.rb +67 -0
- data/spec/functional/fc121_spec.rb +43 -0
- data/spec/regression/expected/aix.txt +4 -0
- data/spec/regression/expected/apt.txt +1 -1
- data/spec/regression/expected/ark.txt +1 -0
- data/spec/regression/expected/boost.txt +1 -0
- data/spec/regression/expected/chef-client.txt +4 -4
- data/spec/regression/expected/chef-ingredient.txt +1 -0
- data/spec/regression/expected/chef_client_updater.txt +1 -0
- data/spec/regression/expected/chef_nginx.txt +2 -0
- data/spec/regression/expected/dmg.txt +3 -3
- data/spec/regression/expected/docker.txt +1 -0
- data/spec/regression/expected/erlang.txt +1 -0
- data/spec/regression/expected/gecode.txt +2 -0
- data/spec/regression/expected/mysql.txt +2 -0
- data/spec/regression/expected/passenger_apache2.txt +2 -0
- data/spec/regression/expected/php.txt +2 -0
- data/spec/regression/expected/tomcat.txt +16 -0
- data/spec/regression/expected/transmission.txt +2 -0
- data/spec/regression/expected/ufw.txt +1 -0
- data/spec/regression/expected/windows.txt +2 -1
- data/spec/regression/expected/xml.txt +2 -0
- data/spec/unit/linter_spec.rb +1 -1
- metadata +11 -11
- data/features/040_check_raw_git_usage.feature +0 -43
- data/features/041_check_raw_download.feature +0 -34
- data/features/048_check_for_shellout.feature +0 -44
- data/lib/foodcritic/rules/fc012.rb +0 -8
- data/spec/functional/fc012_spec.rb +0 -20
@@ -0,0 +1,67 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "FC048" do
|
4
|
+
context "with a recipe that uses simple backticks" do
|
5
|
+
recipe_file "`ls`"
|
6
|
+
it { is_expected.to violate_rule }
|
7
|
+
end
|
8
|
+
|
9
|
+
context "with a recipe that uses %x and containing a variable" do
|
10
|
+
recipe_file '`#{cmd}`'
|
11
|
+
it { is_expected.to violate_rule }
|
12
|
+
end
|
13
|
+
|
14
|
+
context "with a recipe that uses %x and curly brackets" do
|
15
|
+
recipe_file "%x{ls}"
|
16
|
+
it { is_expected.to violate_rule }
|
17
|
+
end
|
18
|
+
|
19
|
+
context "with a recipe that uses %x and square brackets" do
|
20
|
+
recipe_file "%x[ls]"
|
21
|
+
it { is_expected.to violate_rule }
|
22
|
+
end
|
23
|
+
|
24
|
+
context "with a recipe that uses %x and curly brackets containing a variable" do
|
25
|
+
recipe_file '%x{#{cmd} some_dir}'
|
26
|
+
it { is_expected.to violate_rule }
|
27
|
+
end
|
28
|
+
|
29
|
+
context "with a recipe that uses system without parantheses" do
|
30
|
+
recipe_file 'system "ls"'
|
31
|
+
it { is_expected.to violate_rule }
|
32
|
+
end
|
33
|
+
|
34
|
+
context "with a recipe that uses system without parantheses and a variable" do
|
35
|
+
recipe_file "system cmd"
|
36
|
+
it { is_expected.to violate_rule }
|
37
|
+
end
|
38
|
+
|
39
|
+
context "with a recipe that uses system with parantheses" do
|
40
|
+
recipe_file 'system("ls")'
|
41
|
+
it { is_expected.to violate_rule }
|
42
|
+
end
|
43
|
+
|
44
|
+
context "with a recipe that uses system with parantheses and a variable" do
|
45
|
+
recipe_file "system(cmd)"
|
46
|
+
it { is_expected.to violate_rule }
|
47
|
+
end
|
48
|
+
|
49
|
+
context "with a recipe that uses Mixlib::ShellOut" do
|
50
|
+
recipe_file "Mixlib::ShellOut.new('ls').run_command"
|
51
|
+
it { is_expected.to_not violate_rule }
|
52
|
+
end
|
53
|
+
|
54
|
+
context "with a recipe that uses shell_out" do
|
55
|
+
recipe_file "shell_out('ls')"
|
56
|
+
it { is_expected.to_not violate_rule }
|
57
|
+
end
|
58
|
+
|
59
|
+
context "with a recipe that specifies system in a user resource" do
|
60
|
+
recipe_file <<-EOF
|
61
|
+
user 'foo' do
|
62
|
+
system true
|
63
|
+
end
|
64
|
+
EOF
|
65
|
+
it { is_expected.to_not violate_rule }
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "FC121" do
|
4
|
+
context "with metadata depending on build-essential" do
|
5
|
+
metadata_file "name 'test'\ndepends 'build-essential'"
|
6
|
+
it { is_expected.to violate_rule }
|
7
|
+
end
|
8
|
+
|
9
|
+
context "with metadata depending on swap" do
|
10
|
+
metadata_file "name 'test'\ndepends 'swap'"
|
11
|
+
it { is_expected.to violate_rule }
|
12
|
+
end
|
13
|
+
|
14
|
+
context "with metadata depending on dmg" do
|
15
|
+
metadata_file "name 'test'\ndepends 'dmg'"
|
16
|
+
it { is_expected.to violate_rule }
|
17
|
+
end
|
18
|
+
|
19
|
+
context "with metadata depending on mac_os_x" do
|
20
|
+
metadata_file "name 'test'\ndepends 'mac_os_x'"
|
21
|
+
it { is_expected.to violate_rule }
|
22
|
+
end
|
23
|
+
|
24
|
+
context "with metadata depending on chef_handler" do
|
25
|
+
metadata_file "name 'test'\ndepends 'chef_handler'"
|
26
|
+
it { is_expected.to violate_rule }
|
27
|
+
end
|
28
|
+
|
29
|
+
context "with metadata depending on chef_hostname" do
|
30
|
+
metadata_file "name 'test'\ndepends 'chef_hostname'"
|
31
|
+
it { is_expected.to violate_rule }
|
32
|
+
end
|
33
|
+
|
34
|
+
context "with metadata depending on foo" do
|
35
|
+
metadata_file "name 'test'\ndepends 'foo'"
|
36
|
+
it { is_expected.to_not violate_rule }
|
37
|
+
end
|
38
|
+
|
39
|
+
context "with metadata depending on nothing" do
|
40
|
+
metadata_file "name 'test'"
|
41
|
+
it { is_expected.to_not violate_rule }
|
42
|
+
end
|
43
|
+
end
|
@@ -21,3 +21,7 @@ FC113: Resource declares deprecated use_inline_resources: ./providers/toolboxpac
|
|
21
21
|
FC113: Resource declares deprecated use_inline_resources: ./providers/tunables.rb:23
|
22
22
|
FC113: Resource declares deprecated use_inline_resources: ./providers/volume_group.rb:5
|
23
23
|
FC113: Resource declares deprecated use_inline_resources: ./providers/wpar.rb:24
|
24
|
+
FC120: Do not set the name property directly on a resource: ./recipes/wpar.rb:9
|
25
|
+
FC120: Do not set the name property directly on a resource: ./recipes/wpar.rb:18
|
26
|
+
FC120: Do not set the name property directly on a resource: ./recipes/wpar.rb:24
|
27
|
+
FC120: Do not set the name property directly on a resource: ./recipes/wpar.rb:29
|
@@ -1,6 +1,6 @@
|
|
1
1
|
FC043: Prefer new notification syntax: ./providers/repository.rb:112
|
2
2
|
FC043: Prefer new notification syntax: ./recipes/default.rb:48
|
3
|
-
FC048: Prefer
|
3
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./providers/repository.rb:26
|
4
4
|
FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
|
5
5
|
FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
6
6
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
@@ -1,3 +1,4 @@
|
|
1
1
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
2
2
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
3
3
|
FC113: Resource declares deprecated use_inline_resources: ./providers/default.rb:25
|
4
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
@@ -5,3 +5,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
5
5
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
6
6
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
7
7
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
8
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/source.rb:1
|
@@ -2,10 +2,10 @@ FC002: Avoid string interpolation where not required: ./recipes/cron.rb:103
|
|
2
2
|
FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/service.rb:197
|
3
3
|
FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/service.rb:209
|
4
4
|
FC007: Ensure recipe dependencies are reflected in cookbook metadata: ./recipes/service.rb:223
|
5
|
-
FC048: Prefer
|
6
|
-
FC048: Prefer
|
7
|
-
FC048: Prefer
|
8
|
-
FC048: Prefer
|
5
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./recipes/cron.rb:38
|
6
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./recipes/delete_validation.rb:20
|
7
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./recipes/service.rb:52
|
8
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./recipes/task.rb:42
|
9
9
|
FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
|
10
10
|
FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
11
11
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
@@ -3,3 +3,4 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
3
3
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
4
4
|
FC109: Use platform-specific package resources instead of provider property: ./libraries/default_handler.rb:52
|
5
5
|
FC113: Resource declares deprecated use_inline_resources: ./libraries/chef_ingredient_provider.rb:26
|
6
|
+
FC116: Cookbook depends on the deprecated compat_resource cookbook: ./metadata.rb:1
|
@@ -1,3 +1,5 @@
|
|
1
1
|
FC015: Consider converting definition to a Custom Resource: ./definitions/nginx_site.rb:1
|
2
2
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
3
3
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
4
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
5
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/source.rb:38
|
@@ -1,8 +1,8 @@
|
|
1
1
|
FC001: Use strings in preference to symbols to access node attributes: ./attributes/default.rb:19
|
2
2
|
FC001: Use strings in preference to symbols to access node attributes: ./attributes/default.rb:20
|
3
|
-
FC048: Prefer
|
4
|
-
FC048: Prefer
|
5
|
-
FC048: Prefer
|
3
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./providers/package.rb:44
|
4
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./providers/package.rb:47
|
5
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./providers/package.rb:76
|
6
6
|
FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
|
7
7
|
FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
8
8
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
@@ -1,3 +1,4 @@
|
|
1
1
|
FC005: Avoid repetition of resource declarations: ./libraries/docker_service_manager_sysvinit_debian.rb:5
|
2
2
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
3
3
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
4
|
+
FC115: Custom resource contains a name_property that is required: ./libraries/docker_service_base.rb:20
|
@@ -3,3 +3,4 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
3
3
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
6
|
+
FC120: Do not set the name property directly on a resource: ./recipes/default.rb:35
|
@@ -7,3 +7,5 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
7
7
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
8
8
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
9
9
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
10
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
11
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/source.rb:20
|
@@ -16,3 +16,5 @@ FC082: Deprecated node.set or node.set_unless used to set node attributes: ./rec
|
|
16
16
|
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:39
|
17
17
|
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:40
|
18
18
|
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/server.rb:41
|
19
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
20
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/ruby.rb:29
|
@@ -28,3 +28,5 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
28
28
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
29
29
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
30
30
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
31
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
32
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/default.rb:26
|
@@ -3,3 +3,5 @@ FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
|
3
3
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
6
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
7
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/source.rb:23
|
@@ -1,2 +1,18 @@
|
|
1
1
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
2
2
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
3
|
+
FC116: Cookbook depends on the deprecated compat_resource cookbook: ./metadata.rb:1
|
4
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:7
|
5
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:8
|
6
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:9
|
7
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:10
|
8
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:12
|
9
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/install.rb:13
|
10
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_systemd.rb:23
|
11
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_systemd.rb:24
|
12
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_systemd.rb:28
|
13
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_sysv_init.rb:16
|
14
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_sysv_init.rb:17
|
15
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_sysv_init.rb:21
|
16
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_upstart.rb:10
|
17
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_upstart.rb:11
|
18
|
+
FC117: Do not use kind_of in custom resource properties: ./resources/service_upstart.rb:15
|
@@ -10,3 +10,5 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
11
|
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/torrent_file.rb:53
|
12
12
|
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/torrent_file.rb:58
|
13
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
14
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/source.rb:21
|
@@ -9,3 +9,4 @@ FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
|
9
9
|
FC072: Metadata should not contain "attribute" keyword: ./metadata.rb:1
|
10
10
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
11
11
|
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/default.rb:34
|
12
|
+
FC120: Do not set the name property directly on a resource: ./recipes/default.rb:69
|
@@ -3,7 +3,7 @@ FC002: Avoid string interpolation where not required: ./libraries/registry_helpe
|
|
3
3
|
FC002: Avoid string interpolation where not required: ./libraries/windows_privileged.rb:42
|
4
4
|
FC002: Avoid string interpolation where not required: ./libraries/windows_privileged.rb:56
|
5
5
|
FC018: LWRP uses deprecated notification syntax: ./providers/shortcut.rb:54
|
6
|
-
FC048: Prefer
|
6
|
+
FC048: Prefer shell_out helper method to shelling out with Ruby: ./providers/task.rb:106
|
7
7
|
FC064: Ensure issues_url is set in metadata: ./metadata.rb:1
|
8
8
|
FC065: Ensure source_url is set in metadata: ./metadata.rb:1
|
9
9
|
FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
@@ -33,3 +33,4 @@ FC085: Resource using new_resource.updated_by_last_action to converge resource:
|
|
33
33
|
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/task.rb:68
|
34
34
|
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/task.rb:79
|
35
35
|
FC085: Resource using new_resource.updated_by_last_action to converge resource: ./providers/zipfile.rb:41
|
36
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
@@ -4,3 +4,5 @@ FC066: Ensure chef_version is set in metadata: ./metadata.rb:1
|
|
4
4
|
FC069: Ensure standardized license defined in metadata: ./metadata.rb:1
|
5
5
|
FC078: Ensure cookbook shared under an OSI-approved open source license: ./metadata.rb:1
|
6
6
|
FC082: Deprecated node.set or node.set_unless used to set node attributes: ./recipes/ruby.rb:27
|
7
|
+
FC121: Cookbook depends on cookbook made obsolete by Chef 14: ./metadata.rb:1
|
8
|
+
FC122: Use the build_essential resource instead of the recipe: ./recipes/ruby.rb:28
|
data/spec/unit/linter_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe FoodCritic::Linter do
|
|
12
12
|
|
13
13
|
describe "chef version" do
|
14
14
|
it "should be the latest stable version of Chef" do
|
15
|
-
expect(FoodCritic::Linter::DEFAULT_CHEF_VERSION).to eq "
|
15
|
+
expect(FoodCritic::Linter::DEFAULT_CHEF_VERSION).to eq "14.2.0"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foodcritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 14.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Crump
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-core
|
@@ -169,13 +169,13 @@ files:
|
|
169
169
|
- README.md
|
170
170
|
- Rakefile
|
171
171
|
- bin/foodcritic
|
172
|
-
- chef_dsl_metadata/chef_13.0.113.json
|
173
|
-
- chef_dsl_metadata/chef_13.1.31.json
|
174
|
-
- chef_dsl_metadata/chef_13.3.42.json
|
175
172
|
- chef_dsl_metadata/chef_13.4.19.json
|
176
173
|
- chef_dsl_metadata/chef_13.5.3.json
|
177
174
|
- chef_dsl_metadata/chef_13.6.0.json
|
178
175
|
- chef_dsl_metadata/chef_13.7.16.json
|
176
|
+
- chef_dsl_metadata/chef_13.9.1.json
|
177
|
+
- chef_dsl_metadata/chef_14.1.12.json
|
178
|
+
- chef_dsl_metadata/chef_14.2.0.json
|
179
179
|
- features/002_check_string_interpolation.feature
|
180
180
|
- features/005_check_for_resource_repetition.feature
|
181
181
|
- features/006_check_file_mode.feature
|
@@ -194,12 +194,9 @@ files:
|
|
194
194
|
- features/037_check_for_invalid_notification_action.feature
|
195
195
|
- features/038_check_for_invalid_action.feature
|
196
196
|
- features/039_check_for_key_access_to_node_methods.feature
|
197
|
-
- features/040_check_raw_git_usage.feature
|
198
|
-
- features/041_check_raw_download.feature
|
199
197
|
- features/044_check_for_bare_attribute_keys.feature
|
200
198
|
- features/046_check_for_assign_unless_nil_attributes.feature
|
201
199
|
- features/047_check_for_attribute_assignment_without_precedence.feature
|
202
|
-
- features/048_check_for_shellout.feature
|
203
200
|
- features/051_check_for_template_partial_loops.feature
|
204
201
|
- features/build_framework_support.feature
|
205
202
|
- features/checking_all_types_of_file.feature
|
@@ -242,7 +239,6 @@ files:
|
|
242
239
|
- lib/foodcritic/rules/fc009.rb
|
243
240
|
- lib/foodcritic/rules/fc010.rb
|
244
241
|
- lib/foodcritic/rules/fc011.rb
|
245
|
-
- lib/foodcritic/rules/fc012.rb
|
246
242
|
- lib/foodcritic/rules/fc013.rb
|
247
243
|
- lib/foodcritic/rules/fc014.rb
|
248
244
|
- lib/foodcritic/rules/fc015.rb
|
@@ -342,6 +338,7 @@ files:
|
|
342
338
|
- lib/foodcritic/rules/fc118.rb
|
343
339
|
- lib/foodcritic/rules/fc119.rb
|
344
340
|
- lib/foodcritic/rules/fc120.rb
|
341
|
+
- lib/foodcritic/rules/fc121.rb
|
345
342
|
- lib/foodcritic/rules/fc122.rb
|
346
343
|
- lib/foodcritic/template.rb
|
347
344
|
- lib/foodcritic/version.rb
|
@@ -356,7 +353,6 @@ files:
|
|
356
353
|
- spec/functional/fc009_spec.rb
|
357
354
|
- spec/functional/fc010_spec.rb
|
358
355
|
- spec/functional/fc011_spec.rb
|
359
|
-
- spec/functional/fc012_spec.rb
|
360
356
|
- spec/functional/fc013_spec.rb
|
361
357
|
- spec/functional/fc015_spec.rb
|
362
358
|
- spec/functional/fc016_spec.rb
|
@@ -367,9 +363,12 @@ files:
|
|
367
363
|
- spec/functional/fc031_spec.rb
|
368
364
|
- spec/functional/fc037_spec.rb
|
369
365
|
- spec/functional/fc038_spec.rb
|
366
|
+
- spec/functional/fc040_spec.rb
|
367
|
+
- spec/functional/fc041_spec.rb
|
370
368
|
- spec/functional/fc042_spec.rb
|
371
369
|
- spec/functional/fc043_spec.rb
|
372
370
|
- spec/functional/fc045_spec.rb
|
371
|
+
- spec/functional/fc048_spec.rb
|
373
372
|
- spec/functional/fc049_spec.rb
|
374
373
|
- spec/functional/fc050_spec.rb
|
375
374
|
- spec/functional/fc052_spec.rb
|
@@ -437,6 +436,7 @@ files:
|
|
437
436
|
- spec/functional/fc118_spec.rb
|
438
437
|
- spec/functional/fc119_spec.rb
|
439
438
|
- spec/functional/fc120_spec.rb
|
439
|
+
- spec/functional/fc121_spec.rb
|
440
440
|
- spec/functional/fc122_spec.rb
|
441
441
|
- spec/functional/root_aliases_spec.rb
|
442
442
|
- spec/regression/cookbooks.txt
|
@@ -554,5 +554,5 @@ rubyforge_project:
|
|
554
554
|
rubygems_version: 2.7.5
|
555
555
|
signing_key:
|
556
556
|
specification_version: 4
|
557
|
-
summary: foodcritic-
|
557
|
+
summary: foodcritic-14.0.0
|
558
558
|
test_files: []
|
@@ -1,43 +0,0 @@
|
|
1
|
-
Feature: Check for direct usage of git
|
2
|
-
|
3
|
-
In order to access source control repositories idiomatically
|
4
|
-
As a developer
|
5
|
-
I want to use resources for repository access rather than executing git directly
|
6
|
-
|
7
|
-
Scenario Outline: Execute resource
|
8
|
-
Given a cookbook recipe with an execute resource named <name>
|
9
|
-
When I check the cookbook
|
10
|
-
Then the execute resource used to run git commands warning 040 <display> be displayed
|
11
|
-
Examples:
|
12
|
-
| name | display |
|
13
|
-
| git pull | should |
|
14
|
-
| git clone | should |
|
15
|
-
| git fetch | should |
|
16
|
-
| git checkout | should |
|
17
|
-
| git reset --hard | should |
|
18
|
-
| git show | should not |
|
19
|
-
| echo 'bob' && git show | should not |
|
20
|
-
| which foo | should not |
|
21
|
-
|
22
|
-
Scenario Outline: Execute resource
|
23
|
-
Given a cookbook recipe with an execute resource that runs the command <command>
|
24
|
-
When I check the cookbook
|
25
|
-
Then the execute resource used to run git commands warning 040 <display> be displayed
|
26
|
-
Examples:
|
27
|
-
| command | display |
|
28
|
-
| git clone https://github.com/git/git.git | should |
|
29
|
-
| git clone --depth 10 https://github.com/git/git.git | should |
|
30
|
-
| git pull | should |
|
31
|
-
| git fetch origin | should |
|
32
|
-
| git checkout master | should |
|
33
|
-
| git reset --hard | should |
|
34
|
-
| git status && git pull | should |
|
35
|
-
| git show | should not |
|
36
|
-
| echo 'bob' && git show | should not |
|
37
|
-
| gitk | should not |
|
38
|
-
| curl http://github.com/ | should not |
|
39
|
-
|
40
|
-
Scenario: Multiple execute resources
|
41
|
-
Given a cookbook recipe with multiple execute resources where the last uses git
|
42
|
-
When I check the cookbook
|
43
|
-
Then the execute resource used to run git commands warning 040 should be displayed against the last resource
|
@@ -1,34 +0,0 @@
|
|
1
|
-
Feature: Check for direct usage of curl or wget
|
2
|
-
|
3
|
-
In order to fetch remote artifacts idiomatically
|
4
|
-
As a developer
|
5
|
-
I want to use resources to download rather than using curl or wget
|
6
|
-
|
7
|
-
Scenario Outline: Execute resource
|
8
|
-
Given a cookbook recipe with an execute resource named <name>
|
9
|
-
When I check the cookbook
|
10
|
-
Then the execute resource used to run curl or wget commands warning 041 <display> be displayed
|
11
|
-
Examples:
|
12
|
-
| name | display |
|
13
|
-
| curl 'http://example.org/' | should not |
|
14
|
-
| wget 'http://example.org/' | should |
|
15
|
-
| which curl | should not |
|
16
|
-
| sudo wget 'http://example.org/' | should |
|
17
|
-
| reboot | should not |
|
18
|
-
|
19
|
-
Scenario Outline: Execute resource
|
20
|
-
Given a cookbook recipe with an execute resource that runs the command <command>
|
21
|
-
When I check the cookbook
|
22
|
-
Then the execute resource used to run curl or wget commands warning 041 <display> be displayed
|
23
|
-
Examples:
|
24
|
-
| command | display |
|
25
|
-
| which curl | should not |
|
26
|
-
| sudo wget 'http://example.org/' | should |
|
27
|
-
| curl -X POST 'http://example.org/' | should not |
|
28
|
-
| curl 'http://example.org/' | should not |
|
29
|
-
| curl 'http://example.org/' -o foo | should |
|
30
|
-
| curl 'http://example.org/' --output foo | should |
|
31
|
-
| curl 'http://example.org/' &>bar | should |
|
32
|
-
| curl -o baz 'http://example.org/'> bing | should |
|
33
|
-
| wget 'http://example.org/' | should |
|
34
|
-
| mkdir foo && wget 'http://example.org/' | should |
|