foodcritic-rackspace-rules 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -68,4 +68,23 @@ rule 'RACK002', 'Recipe contains a single include_recipe' do
|
|
68
68
|
end # cookbook
|
69
69
|
end # rule
|
70
70
|
|
71
|
+
rule 'RACK003', 'Cookbook is missing a standard file' do
|
72
|
+
tags %w(style rackspace)
|
71
73
|
|
74
|
+
expected_files = %w(README.md metadata.rb LICENSE Gemfile Berksfile Rakefile Thorfile Guardfile .kitchen.yml .rubocop.yml )
|
75
|
+
|
76
|
+
cookbook do |path|
|
77
|
+
matches = []
|
78
|
+
expected_files.each do |f|
|
79
|
+
next unless !File.exist?("#{path}/#{f}")
|
80
|
+
|
81
|
+
matches << {
|
82
|
+
:filename => "#{f}",
|
83
|
+
:matched => 'missing',
|
84
|
+
:line => 0,
|
85
|
+
:column => 0
|
86
|
+
}
|
87
|
+
end
|
88
|
+
matches
|
89
|
+
end # cookbook
|
90
|
+
end # rule
|