foodcritic 11.2.0 → 11.3.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 +239 -226
- data/README.md +3 -3
- data/features/033_check_for_missing_template.feature +2 -3
- data/features/support/command_helpers.rb +4 -6
- data/foodcritic.gemspec +1 -1
- data/lib/foodcritic.rb +1 -1
- data/lib/foodcritic/api.rb +2 -3
- data/lib/foodcritic/chef.rb +2 -2
- data/lib/foodcritic/error_checker.rb +1 -1
- data/lib/foodcritic/rules/fc001.rb +2 -1
- data/lib/foodcritic/rules/fc019.rb +1 -3
- data/lib/foodcritic/rules/fc033.rb +12 -4
- data/lib/foodcritic/version.rb +1 -1
- data/man/foodcritic.1 +81 -0
- data/spec/functional/fc001_spec.rb +5 -0
- data/spec/regression/expected/windows.txt +0 -3
- data/spec/unit/api_spec.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88fc0b6609663a3130b05790fa5b002148959083
|
4
|
+
data.tar.gz: 625351ee8459d8a682782e0afdd3588b055a608e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417a8069b069de299e86ea247954d36da67a55846adee2e31f95ee96ca3d8c951b2d0726ce27f46c99838269d1dbf4b2685379a64291ed501275d613e3497741
|
7
|
+
data.tar.gz: 93162e4cef27844a44bcf91d3b96cfb4d3b7cc2d4205deb3f2218aa07fd3aa5bcf2d3abd5f5de0da533fcb250b2c822390b52bbc74fb5c049d898688cd846af1
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,21 @@
|
|
1
1
|
# Foodcritic Changelog:
|
2
2
|
|
3
|
-
## [11.
|
3
|
+
## [11.3.0](https://github.com/Foodcritic/foodcritic/tree/v11.3.0) (2017-07-12)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/
|
5
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v11.2.0...v11.3.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- The yajl-ruby dependency has been replaced with ffi-yajl which is used by Chef and is already present in ChefDK. A single usage of Ruby's JSON parser has also been replaced with ffi-yajl as well.
|
10
|
+
- FC033 logic has been slightly simplified.
|
11
|
+
|
12
|
+
**Fixed bugs:**
|
13
|
+
|
14
|
+
- FC001 will no longer alert when a user references the run_state, which is correctly accessed as a symbol and not a string.
|
15
|
+
|
16
|
+
## [11.2.0](https://github.com/Foodcritic/foodcritic/tree/v11.2.0) (2017-06-12)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v11.1.0...v11.2.0)
|
6
19
|
|
7
20
|
**Implemented enhancements:**
|
8
21
|
|
@@ -13,9 +26,9 @@
|
|
13
26
|
- Disabled the `opensource` tag by default to simply use of Foodcritic for non-community cookbook developers. At the time of writing this only includes `FC078`. To enable it again: `foodcritic -t any .`
|
14
27
|
- Added a Dockerfile for running Foodcritic in Docker.
|
15
28
|
|
16
|
-
## [11.1.0](https://github.com/
|
29
|
+
## [11.1.0](https://github.com/Foodcritic/foodcritic/tree/v11.1.0) (2017-05-18)
|
17
30
|
|
18
|
-
[Full Changelog](https://github.com/
|
31
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v11.0.0...v11.1.0)
|
19
32
|
|
20
33
|
**Implemented enhancements:**
|
21
34
|
|
@@ -27,9 +40,9 @@
|
|
27
40
|
- Added metadata for Chef 12.20.3 and made it the default
|
28
41
|
- Updated several rule names to be more clear that we're checking for deprecated functionality
|
29
42
|
|
30
|
-
## [11.0.0](https://github.com/
|
43
|
+
## [11.0.0](https://github.com/Foodcritic/foodcritic/tree/v11.0.0) (2017-04-24)
|
31
44
|
|
32
|
-
[Full Changelog](https://github.com/
|
45
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.4.1...v11.0.0)
|
33
46
|
|
34
47
|
**Implemented enhancements:**
|
35
48
|
|
@@ -52,9 +65,9 @@
|
|
52
65
|
- Added the `license` and `supermarket` tag to FC078.
|
53
66
|
- Updated the `field` and `field_value` API methods to correctly recognize additional formats of data in the metdata.
|
54
67
|
|
55
|
-
## [10.4.1](https://github.com/
|
68
|
+
## [10.4.1](https://github.com/Foodcritic/foodcritic/tree/v10.4.1) (2017-04-17)
|
56
69
|
|
57
|
-
[Full Changelog](https://github.com/
|
70
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.4.0...v10.4.1)
|
58
71
|
|
59
72
|
**Implemented enhancements:**
|
60
73
|
|
@@ -70,9 +83,9 @@
|
|
70
83
|
- Fixed FC071 to detect the LICENSE file if foodcritic is not running in the root of the cookbook
|
71
84
|
- Fixed FC070 to not alert when platform supports is defined through an array of platforms
|
72
85
|
|
73
|
-
## [10.4.0](https://github.com/
|
86
|
+
## [10.4.0](https://github.com/Foodcritic/foodcritic/tree/v10.4.0) (2017-04-13)
|
74
87
|
|
75
|
-
[Full Changelog](https://github.com/
|
88
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.3.1...v10.4.0)
|
76
89
|
|
77
90
|
**Implemented enhancements:**
|
78
91
|
|
@@ -86,9 +99,9 @@
|
|
86
99
|
- FC053 / FC052 updated to properly refer the metadata as deprecated and not unimplemented
|
87
100
|
- FC071 no longer alerts when cookbooks are licensed as "All Rights Reserved"
|
88
101
|
|
89
|
-
## [10.3.1](https://github.com/
|
102
|
+
## [10.3.1](https://github.com/Foodcritic/foodcritic/tree/v10.3.1) (2017-04-10)
|
90
103
|
|
91
|
-
[Full Changelog](https://github.com/
|
104
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.3.0...v10.3.1)
|
92
105
|
|
93
106
|
**Implemented enhancements:**
|
94
107
|
|
@@ -98,9 +111,9 @@
|
|
98
111
|
|
99
112
|
- Resolved a regression when running Foodcritic as a Rake task
|
100
113
|
|
101
|
-
## [10.3.0](https://github.com/
|
114
|
+
## [10.3.0](https://github.com/Foodcritic/foodcritic/tree/v10.3.0) (2017-04-10)
|
102
115
|
|
103
|
-
[Full Changelog](https://github.com/
|
116
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.2.2...v10.3.0)
|
104
117
|
|
105
118
|
**Implemented enhancements:**
|
106
119
|
|
@@ -117,472 +130,472 @@
|
|
117
130
|
- Added support for the Chef 13 root alias cookbook structure changes defined in <https://github.com/chef/chef-rfc/blob/master/rfc033-root-aliases.md>
|
118
131
|
- Testing has been completed reworked to simplify testing and allow for far more robust functional tests. Minitest unit tests have been converted to rspec and a new functional testing framework has been added utilizing rspec. Tests for a large number of the existing rules have been converted to this new framework. The new testing framework allows for simple all-in-one tests that are easier to read and much simpler to write. Additionally the regression tests have been reworked, and are now enabled in Travis CI, which will require regeneration of the expected output if new tests are added using `rake regen_regression`. See the readme for additional details on running tests.
|
119
132
|
|
120
|
-
## [10.2.2](https://github.com/
|
133
|
+
## [10.2.2](https://github.com/Foodcritic/foodcritic/tree/v10.2.2) (2017-03-31)
|
121
134
|
|
122
|
-
[Full Changelog](https://github.com/
|
135
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.2.1...v10.2.2)
|
123
136
|
|
124
137
|
**Implemented enhancements:**
|
125
138
|
|
126
|
-
- Align rake setup better with CLI options to resolve bugs with tags in Rake [#533](https://github.com/
|
139
|
+
- Align rake setup better with CLI options to resolve bugs with tags in Rake [#533](https://github.com/Foodcritic/foodcritic/pull/533) ([tas50](https://github.com/tas50))
|
127
140
|
|
128
|
-
## [v10.2.1](https://github.com/
|
141
|
+
## [v10.2.1](https://github.com/Foodcritic/foodcritic/tree/v10.2.1) (2017-03-31)
|
129
142
|
|
130
|
-
[Full Changelog](https://github.com/
|
143
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.2.0...v10.2.1)
|
131
144
|
|
132
145
|
**Implemented enhancements:**
|
133
146
|
|
134
|
-
- Add supermarket tag to FC067 and FC068 [#532](https://github.com/
|
147
|
+
- Add supermarket tag to FC067 and FC068 [#532](https://github.com/Foodcritic/foodcritic/pull/532) ([tas50](https://github.com/tas50))
|
135
148
|
|
136
|
-
## [v10.2.0](https://github.com/
|
149
|
+
## [v10.2.0](https://github.com/Foodcritic/foodcritic/tree/v10.2.0) (2017-03-30)
|
137
150
|
|
138
|
-
[Full Changelog](https://github.com/
|
151
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.1.1...v10.2.0)
|
139
152
|
|
140
153
|
**Implemented enhancements:**
|
141
154
|
|
142
|
-
- Add FC066/FC067/FC068 to check metadata chef_version, license, and supports [#528](https://github.com/
|
155
|
+
- Add FC066/FC067/FC068 to check metadata chef_version, license, and supports [#528](https://github.com/Foodcritic/foodcritic/pull/528) ([tas50](https://github.com/tas50))
|
143
156
|
|
144
157
|
**Fixed bugs:**
|
145
158
|
|
146
|
-
- Don't trigger FC007 on a shorthand recipe includes [#526](https://github.com/
|
147
|
-
- Fix already initialized constant warning with `--search-gems` [#529](https://github.com/
|
159
|
+
- Don't trigger FC007 on a shorthand recipe includes [#526](https://github.com/Foodcritic/foodcritic/pull/526) ([tas50](https://github.com/tas50))
|
160
|
+
- Fix already initialized constant warning with `--search-gems` [#529](https://github.com/Foodcritic/foodcritic/pull/529) ([nvwls](https://github.com/nvwls))
|
148
161
|
|
149
|
-
## [v10.1.1](https://github.com/
|
162
|
+
## [v10.1.1](https://github.com/Foodcritic/foodcritic/tree/v10.1.1) (2017-03-29)
|
150
163
|
|
151
|
-
[Full Changelog](https://github.com/
|
164
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.1.0...v10.1.1)
|
152
165
|
|
153
166
|
**Fixed bugs:**
|
154
167
|
|
155
|
-
- Fix FC016 triggering on custom resources [#525](https://github.com/
|
168
|
+
- Fix FC016 triggering on custom resources [#525](https://github.com/Foodcritic/foodcritic/pull/525) ([tas50](https://github.com/tas50))
|
156
169
|
|
157
|
-
## [v10.1.0](https://github.com/
|
170
|
+
## [v10.1.0](https://github.com/Foodcritic/foodcritic/tree/v10.1.0) (2017-03-29)
|
158
171
|
|
159
|
-
[Full Changelog](https://github.com/
|
172
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v10.0.0...v10.1.0)
|
160
173
|
|
161
174
|
**Implemented enhancements:**
|
162
175
|
|
163
|
-
- Remove FC023 which is no longer considered best practice [#523](https://github.com/
|
164
|
-
- Add basic testing of the metadata_field api [#522](https://github.com/
|
165
|
-
- Add a more robust cookbook_base_path helper to the API [#520](https://github.com/
|
166
|
-
- Update various tags to better align the rules with the tag categories [#517](https://github.com/
|
176
|
+
- Remove FC023 which is no longer considered best practice [#523](https://github.com/Foodcritic/foodcritic/pull/523) ([tas50](https://github.com/tas50))
|
177
|
+
- Add basic testing of the metadata_field api [#522](https://github.com/Foodcritic/foodcritic/pull/522) ([tas50](https://github.com/tas50))
|
178
|
+
- Add a more robust cookbook_base_path helper to the API [#520](https://github.com/Foodcritic/foodcritic/pull/520) ([tas50](https://github.com/tas50))
|
179
|
+
- Update various tags to better align the rules with the tag categories [#517](https://github.com/Foodcritic/foodcritic/pull/517) ([tas50](https://github.com/tas50))
|
167
180
|
|
168
|
-
## [v10.0.0](https://github.com/
|
181
|
+
## [v10.0.0](https://github.com/Foodcritic/foodcritic/tree/v10.0.0) (2017-03-14)
|
169
182
|
|
170
|
-
[Full Changelog](https://github.com/
|
183
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v9.0.0...v10.0.0)
|
171
184
|
|
172
185
|
**Implemented enhancements:**
|
173
186
|
|
174
|
-
- Add 12.19 metadata as default and remove 12.0 - 12.5.1 [#516](https://github.com/
|
175
|
-
- Remove FC003 from Foodcritic [#512](https://github.com/
|
187
|
+
- Add 12.19 metadata as default and remove 12.0 - 12.5.1 [#516](https://github.com/Foodcritic/foodcritic/pull/516) ([tas50](https://github.com/tas50))
|
188
|
+
- Remove FC003 from Foodcritic [#512](https://github.com/Foodcritic/foodcritic/pull/512) ([tas50](https://github.com/tas50))
|
176
189
|
|
177
|
-
## [v9.0.0](https://github.com/
|
190
|
+
## [v9.0.0](https://github.com/Foodcritic/foodcritic/tree/v9.0.0) (2017-01-31)
|
178
191
|
|
179
|
-
[Full Changelog](https://github.com/
|
192
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v8.2.0...v9.0.0)
|
180
193
|
|
181
194
|
**Implemented enhancements:**
|
182
195
|
|
183
|
-
- Add 12.18.31 metadata and make it the default [#508](https://github.com/
|
184
|
-
- Test on Ruby 2.4 and fix failing tests [#507](https://github.com/
|
185
|
-
- Support Chef RFC 17 compliant templates [#485](https://github.com/
|
186
|
-
- More sane default CLI values [#462](https://github.com/
|
196
|
+
- Add 12.18.31 metadata and make it the default [#508](https://github.com/Foodcritic/foodcritic/pull/508) ([tas50](https://github.com/tas50))
|
197
|
+
- Test on Ruby 2.4 and fix failing tests [#507](https://github.com/Foodcritic/foodcritic/pull/507) ([tas50](https://github.com/tas50))
|
198
|
+
- Support Chef RFC 17 compliant templates [#485](https://github.com/Foodcritic/foodcritic/pull/485) ([hagihala](https://github.com/hagihala))
|
199
|
+
- More sane default CLI values [#462](https://github.com/Foodcritic/foodcritic/pull/462) ([tas50](https://github.com/tas50))
|
187
200
|
|
188
|
-
## [v8.2.0](https://github.com/
|
201
|
+
## [v8.2.0](https://github.com/Foodcritic/foodcritic/tree/v8.2.0) (2017-01-09)
|
189
202
|
|
190
|
-
[Full Changelog](https://github.com/
|
203
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v8.1.0...v8.2.0)
|
191
204
|
|
192
205
|
**Implemented enhancements:**
|
193
206
|
|
194
|
-
- Add 12.17.44 metadata (and make it the default) [#505](https://github.com/
|
195
|
-
- Add 12.16.42 metadata and make it the default [#497](https://github.com/
|
207
|
+
- Add 12.17.44 metadata (and make it the default) [#505](https://github.com/Foodcritic/foodcritic/pull/505) ([tas50](https://github.com/tas50))
|
208
|
+
- Add 12.16.42 metadata and make it the default [#497](https://github.com/Foodcritic/foodcritic/pull/497) ([tas50](https://github.com/tas50))
|
196
209
|
|
197
|
-
## [v8.1.0](https://github.com/
|
210
|
+
## [v8.1.0](https://github.com/Foodcritic/foodcritic/tree/v8.1.0) (2016-10-20)
|
198
211
|
|
199
|
-
[Full Changelog](https://github.com/
|
212
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v8.0.0...v8.1.0)
|
200
213
|
|
201
214
|
**Implemented enhancements:**
|
202
215
|
|
203
|
-
- Add Chef client 12.15.19 metadata [#493](https://github.com/
|
204
|
-
- Clarify exclude path instructions in the CLI help [#489](https://github.com/
|
216
|
+
- Add Chef client 12.15.19 metadata [#493](https://github.com/Foodcritic/foodcritic/pull/493) ([tas50](https://github.com/tas50))
|
217
|
+
- Clarify exclude path instructions in the CLI help [#489](https://github.com/Foodcritic/foodcritic/pull/489) ([unixorn](https://github.com/unixorn))
|
205
218
|
|
206
|
-
## [v8.0.0](https://github.com/
|
219
|
+
## [v8.0.0](https://github.com/Foodcritic/foodcritic/tree/v8.0.0) (2016-09-23)
|
207
220
|
|
208
|
-
[Full Changelog](https://github.com/
|
221
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v7.1.0...v8.0.0)
|
209
222
|
|
210
223
|
**Implemented enhancements:**
|
211
224
|
|
212
|
-
- Require Ruby 2.2.2 [#487](https://github.com/
|
213
|
-
- Add 12.14.89 metadata and make it the default [#486](https://github.com/
|
214
|
-
- Remove Chef 11 metadata and rule support [#481](https://github.com/
|
225
|
+
- Require Ruby 2.2.2 [#487](https://github.com/Foodcritic/foodcritic/pull/487) ([tas50](https://github.com/tas50))
|
226
|
+
- Add 12.14.89 metadata and make it the default [#486](https://github.com/Foodcritic/foodcritic/pull/486) ([tas50](https://github.com/tas50))
|
227
|
+
- Remove Chef 11 metadata and rule support [#481](https://github.com/Foodcritic/foodcritic/pull/481) ([tas50](https://github.com/tas50))
|
215
228
|
|
216
|
-
## [v7.1.0](https://github.com/
|
229
|
+
## [v7.1.0](https://github.com/Foodcritic/foodcritic/tree/v7.1.0) (2016-08-17)
|
217
230
|
|
218
|
-
[Full Changelog](https://github.com/
|
231
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v7.0.1...v7.1.0)
|
219
232
|
|
220
233
|
**Implemented enhancements:**
|
221
234
|
|
222
|
-
- Add Chef 12.13.37 metadata and make it the default [#479](https://github.com/
|
223
|
-
- Add 12.12.13 metadata and fix metadata generation [#472](https://github.com/
|
235
|
+
- Add Chef 12.13.37 metadata and make it the default [#479](https://github.com/Foodcritic/foodcritic/pull/479) ([tas50](https://github.com/tas50))
|
236
|
+
- Add 12.12.13 metadata and fix metadata generation [#472](https://github.com/Foodcritic/foodcritic/pull/472) ([tas50](https://github.com/tas50))
|
224
237
|
|
225
238
|
**Fixed bugs:**
|
226
239
|
|
227
|
-
- Add missing assigment attributes [#478](https://github.com/
|
240
|
+
- Add missing assigment attributes [#478](https://github.com/Foodcritic/foodcritic/pull/478) ([ofir-petrushka](https://github.com/ofir-petrushka))
|
228
241
|
|
229
|
-
## [v7.0.1](https://github.com/
|
242
|
+
## [v7.0.1](https://github.com/Foodcritic/foodcritic/tree/v7.0.1) (2016-07-06)
|
230
243
|
|
231
|
-
[Full Changelog](https://github.com/
|
244
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v7.0.0...v7.0.1)
|
232
245
|
|
233
246
|
**Implemented enhancements:**
|
234
247
|
|
235
|
-
- Readme improvements [#468](https://github.com/
|
248
|
+
- Readme improvements [#468](https://github.com/Foodcritic/foodcritic/pull/468) ([tas50](https://github.com/tas50))
|
236
249
|
|
237
|
-
## [v7.0.0](https://github.com/
|
250
|
+
## [v7.0.0](https://github.com/Foodcritic/foodcritic/tree/v7.0.0) (2016-07-05)
|
238
251
|
|
239
|
-
[Full Changelog](https://github.com/
|
252
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.3.0...v7.0.0)
|
240
253
|
|
241
254
|
**Implemented enhancements:**
|
242
255
|
|
243
|
-
- Remove support for Ruby 2.0 [#465](https://github.com/
|
244
|
-
- Remove chef version support for Chef 0.7, 0.8, 0.9, and 0.10 [#464](https://github.com/
|
245
|
-
- Add chef 12.11.18 metadata and make it the default [#461](https://github.com/
|
246
|
-
- FC032 allow the new :before timing on resource notifications in Chef >= 12.6.0 [#441](https://github.com/
|
247
|
-
- New cookbook_maintainer api methods [#248](https://github.com/
|
256
|
+
- Remove support for Ruby 2.0 [#465](https://github.com/Foodcritic/foodcritic/pull/465) ([tas50](https://github.com/tas50))
|
257
|
+
- Remove chef version support for Chef 0.7, 0.8, 0.9, and 0.10 [#464](https://github.com/Foodcritic/foodcritic/pull/464) ([tas50](https://github.com/tas50))
|
258
|
+
- Add chef 12.11.18 metadata and make it the default [#461](https://github.com/Foodcritic/foodcritic/pull/461) ([tas50](https://github.com/tas50))
|
259
|
+
- FC032 allow the new :before timing on resource notifications in Chef >= 12.6.0 [#441](https://github.com/Foodcritic/foodcritic/pull/441) ([gnjack](https://github.com/gnjack))
|
260
|
+
- New cookbook_maintainer api methods [#248](https://github.com/Foodcritic/foodcritic/pull/248) ([miguelcnf](https://github.com/miguelcnf))
|
248
261
|
|
249
|
-
## [v6.3.0](https://github.com/
|
262
|
+
## [v6.3.0](https://github.com/Foodcritic/foodcritic/tree/v6.3.0) (2016-05-16)
|
250
263
|
|
251
|
-
[Full Changelog](https://github.com/
|
264
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.2.0...v6.3.0)
|
252
265
|
|
253
266
|
**Implemented enhancements:**
|
254
267
|
|
255
|
-
- Add Chef 12.10.24 metadata and release 6.3.0 [#456](https://github.com/
|
268
|
+
- Add Chef 12.10.24 metadata and release 6.3.0 [#456](https://github.com/Foodcritic/foodcritic/pull/456) ([tas50](https://github.com/tas50))
|
256
269
|
|
257
|
-
## [v6.2.0](https://github.com/
|
270
|
+
## [v6.2.0](https://github.com/Foodcritic/foodcritic/tree/v6.2.0) (2016-04-26)
|
258
271
|
|
259
|
-
[Full Changelog](https://github.com/
|
272
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.1.1...v6.2.0)
|
260
273
|
|
261
274
|
**Implemented enhancements:**
|
262
275
|
|
263
|
-
- Add 12.9.38 metadata and make it the default chef version [#452](https://github.com/
|
276
|
+
- Add 12.9.38 metadata and make it the default chef version [#452](https://github.com/Foodcritic/foodcritic/pull/452) ([tas50](https://github.com/tas50))
|
264
277
|
|
265
|
-
## [v6.1.1](https://github.com/
|
278
|
+
## [v6.1.1](https://github.com/Foodcritic/foodcritic/tree/v6.1.1) (2016-04-08)
|
266
279
|
|
267
|
-
[Full Changelog](https://github.com/
|
280
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.1.0...v6.1.1)
|
268
281
|
|
269
282
|
**Implemented enhancements:**
|
270
283
|
|
271
|
-
- Use latest gherkin for faster installs [#447](https://github.com/
|
284
|
+
- Use latest gherkin for faster installs [#447](https://github.com/Foodcritic/foodcritic/pull/447) ([jkeiser](https://github.com/jkeiser))
|
272
285
|
|
273
|
-
## [v6.1.0](https://github.com/
|
286
|
+
## [v6.1.0](https://github.com/Foodcritic/foodcritic/tree/v6.1.0) (2016-04-06)
|
274
287
|
|
275
|
-
[Full Changelog](https://github.com/
|
288
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.0.1...v6.1.0)
|
276
289
|
|
277
290
|
**Implemented enhancements:**
|
278
291
|
|
279
|
-
- Don't require cucumber and rubocop to run rake [#444](https://github.com/
|
280
|
-
- Add 12.8.1 metadata + update metadata process [#438](https://github.com/
|
281
|
-
- Add metadata for Chef 12.7.2 and update instructions [#427](https://github.com/
|
292
|
+
- Don't require cucumber and rubocop to run rake [#444](https://github.com/Foodcritic/foodcritic/pull/444) ([jkeiser](https://github.com/jkeiser))
|
293
|
+
- Add 12.8.1 metadata + update metadata process [#438](https://github.com/Foodcritic/foodcritic/pull/438) ([tas50](https://github.com/tas50))
|
294
|
+
- Add metadata for Chef 12.7.2 and update instructions [#427](https://github.com/Foodcritic/foodcritic/pull/427) ([tas50](https://github.com/tas50))
|
282
295
|
|
283
296
|
**Fixed bugs:**
|
284
297
|
|
285
|
-
- Rake.last_comment was depreciated in Rake11\. [#434](https://github.com/
|
298
|
+
- Rake.last_comment was depreciated in Rake11\. [#434](https://github.com/Foodcritic/foodcritic/pull/434) ([gkuchta](https://github.com/gkuchta))
|
286
299
|
|
287
|
-
## [v6.0.1](https://github.com/
|
300
|
+
## [v6.0.1](https://github.com/Foodcritic/foodcritic/tree/v6.0.1) (2016-02-22)
|
288
301
|
|
289
|
-
[Full Changelog](https://github.com/
|
302
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v6.0.0...v6.0.1)
|
290
303
|
|
291
304
|
**Implemented enhancements:**
|
292
305
|
|
293
|
-
- Check for URLs that are helpful to the Supermarket [#421](https://github.com/
|
306
|
+
- Check for URLs that are helpful to the Supermarket [#421](https://github.com/Foodcritic/foodcritic/pull/421) ([nathenharvey](https://github.com/nathenharvey))
|
294
307
|
|
295
308
|
**Fixed bugs:**
|
296
309
|
|
297
|
-
- Fix FC058 false positives [#423](https://github.com/
|
310
|
+
- Fix FC058 false positives [#423](https://github.com/Foodcritic/foodcritic/pull/423) ([jaym](https://github.com/jaym))
|
298
311
|
|
299
|
-
## [v6.0.0](https://github.com/
|
312
|
+
## [v6.0.0](https://github.com/Foodcritic/foodcritic/tree/v6.0.0) (2016-01-14)
|
300
313
|
|
301
|
-
[Full Changelog](https://github.com/
|
314
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v5.0.0...v6.0.0)
|
302
315
|
|
303
316
|
**Implemented enhancements:**
|
304
317
|
|
305
|
-
- Cookbook version is specified in metadata [#347](https://github.com/
|
306
|
-
- FC035 - Templates, Style [#62](https://github.com/
|
307
|
-
- Add Chef 12.6.0 metadata [#417](https://github.com/
|
308
|
-
- New Rule 61 - valid cookbook version [#405](https://github.com/
|
309
|
-
- Require Oracle as a RHEL equiv [#404](https://github.com/
|
310
|
-
- Suggest updating from definitions to custom resources [#403](https://github.com/
|
311
|
-
- add checks for correct use of use_inline_resources [#402](https://github.com/
|
312
|
-
- Add new tags for rules [#401](https://github.com/
|
313
|
-
- Rename FC045 since Chef 12 requires name metadata [#399](https://github.com/
|
314
|
-
- Add Chef 12.5.1 metadata [#397](https://github.com/
|
315
|
-
- Add self-dependency warning [#328](https://github.com/
|
318
|
+
- Cookbook version is specified in metadata [#347](https://github.com/Foodcritic/foodcritic/issues/347)
|
319
|
+
- FC035 - Templates, Style [#62](https://github.com/Foodcritic/foodcritic/issues/62)
|
320
|
+
- Add Chef 12.6.0 metadata [#417](https://github.com/Foodcritic/foodcritic/pull/417) ([tas50](https://github.com/tas50))
|
321
|
+
- New Rule 61 - valid cookbook version [#405](https://github.com/Foodcritic/foodcritic/pull/405) ([lamont-granquist](https://github.com/lamont-granquist))
|
322
|
+
- Require Oracle as a RHEL equiv [#404](https://github.com/Foodcritic/foodcritic/pull/404) ([tas50](https://github.com/tas50))
|
323
|
+
- Suggest updating from definitions to custom resources [#403](https://github.com/Foodcritic/foodcritic/pull/403) ([tas50](https://github.com/tas50))
|
324
|
+
- add checks for correct use of use_inline_resources [#402](https://github.com/Foodcritic/foodcritic/pull/402) ([lamont-granquist](https://github.com/lamont-granquist))
|
325
|
+
- Add new tags for rules [#401](https://github.com/Foodcritic/foodcritic/pull/401) ([tas50](https://github.com/tas50))
|
326
|
+
- Rename FC045 since Chef 12 requires name metadata [#399](https://github.com/Foodcritic/foodcritic/pull/399) ([tas50](https://github.com/tas50))
|
327
|
+
- Add Chef 12.5.1 metadata [#397](https://github.com/Foodcritic/foodcritic/pull/397) ([tas50](https://github.com/tas50))
|
328
|
+
- Add self-dependency warning [#328](https://github.com/Foodcritic/foodcritic/pull/328) ([lamont-granquist](https://github.com/lamont-granquist))
|
316
329
|
|
317
330
|
**Fixed bugs:**
|
318
331
|
|
319
|
-
- Time to cut a release? [#344](https://github.com/
|
320
|
-
- FC048: Warn within a provider block, refs #365 [#413](https://github.com/
|
321
|
-
- use_inline_resources checks apply to Chef 11+ [#410](https://github.com/
|
322
|
-
- fix for edge condition with 061 [#408](https://github.com/
|
323
|
-
- Rake options override default options [#382](https://github.com/
|
332
|
+
- Time to cut a release? [#344](https://github.com/Foodcritic/foodcritic/issues/344)
|
333
|
+
- FC048: Warn within a provider block, refs #365 [#413](https://github.com/Foodcritic/foodcritic/pull/413) ([acrmp](https://github.com/Foodcritic))
|
334
|
+
- use_inline_resources checks apply to Chef 11+ [#410](https://github.com/Foodcritic/foodcritic/pull/410) ([tas50](https://github.com/tas50))
|
335
|
+
- fix for edge condition with 061 [#408](https://github.com/Foodcritic/foodcritic/pull/408) ([lamont-granquist](https://github.com/lamont-granquist))
|
336
|
+
- Rake options override default options [#382](https://github.com/Foodcritic/foodcritic/pull/382) ([pkang](https://github.com/pkang))
|
324
337
|
|
325
338
|
**Closed issues:**
|
326
339
|
|
327
|
-
- Chef Docs vs Foodcritic 4.x [#354](https://github.com/
|
328
|
-
- Github pages have drifted from foodcritic.io [#332](https://github.com/
|
329
|
-
- FC001 is re-enabled thus <http://www.foodcritic.io/> is out-of-date [#330](https://github.com/
|
340
|
+
- Chef Docs vs Foodcritic 4.x [#354](https://github.com/Foodcritic/foodcritic/issues/354)
|
341
|
+
- Github pages have drifted from foodcritic.io [#332](https://github.com/Foodcritic/foodcritic/issues/332)
|
342
|
+
- FC001 is re-enabled thus <http://www.foodcritic.io/> is out-of-date [#330](https://github.com/Foodcritic/foodcritic/issues/330)
|
330
343
|
|
331
|
-
## [v5.0.0](https://github.com/
|
344
|
+
## [v5.0.0](https://github.com/Foodcritic/foodcritic/tree/v5.0.0) (2015-09-17)
|
332
345
|
|
333
|
-
[Full Changelog](https://github.com/
|
346
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v4.0.0...v5.0.0)
|
334
347
|
|
335
348
|
**Implemented enhancements:**
|
336
349
|
|
337
|
-
- Support for a magic comment to temporarily disable a rule [#259](https://github.com/
|
338
|
-
- FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/
|
339
|
-
- Create a rule for "execute resource used to install packages" [#180](https://github.com/
|
340
|
-
- New Rule Proposal: uid/gid should be integer [#53](https://github.com/
|
341
|
-
- merge default options before check instead of during intialization [#321](https://github.com/
|
350
|
+
- Support for a magic comment to temporarily disable a rule [#259](https://github.com/Foodcritic/foodcritic/issues/259)
|
351
|
+
- FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/Foodcritic/foodcritic/issues/242)
|
352
|
+
- Create a rule for "execute resource used to install packages" [#180](https://github.com/Foodcritic/foodcritic/issues/180)
|
353
|
+
- New Rule Proposal: uid/gid should be integer [#53](https://github.com/Foodcritic/foodcritic/issues/53)
|
354
|
+
- merge default options before check instead of during intialization [#321](https://github.com/Foodcritic/foodcritic/pull/321) ([ranjib](https://github.com/ranjib))
|
342
355
|
|
343
356
|
**Fixed bugs:**
|
344
357
|
|
345
|
-
- Fix FC031 and FC045 and metadata.rb vs metadata.json issues [#369](https://github.com/
|
346
|
-
- FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/
|
347
|
-
- FC010 Test failures due to missing search support [#199](https://github.com/
|
348
|
-
- 'lazy' causes false-positive in FC009 - on previous line [#189](https://github.com/
|
349
|
-
- FC051 tries to validate temp files of the editors [#172](https://github.com/
|
358
|
+
- Fix FC031 and FC045 and metadata.rb vs metadata.json issues [#369](https://github.com/Foodcritic/foodcritic/issues/369)
|
359
|
+
- FC007 false positive on depending on the cookbook currently being parsed [#242](https://github.com/Foodcritic/foodcritic/issues/242)
|
360
|
+
- FC010 Test failures due to missing search support [#199](https://github.com/Foodcritic/foodcritic/issues/199)
|
361
|
+
- 'lazy' causes false-positive in FC009 - on previous line [#189](https://github.com/Foodcritic/foodcritic/issues/189)
|
362
|
+
- FC051 tries to validate temp files of the editors [#172](https://github.com/Foodcritic/foodcritic/issues/172)
|
350
363
|
|
351
|
-
## [v4.0.0](https://github.com/
|
364
|
+
## [v4.0.0](https://github.com/Foodcritic/foodcritic/tree/v4.0.0) (2014-06-11)
|
352
365
|
|
353
|
-
[Full Changelog](https://github.com/
|
366
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v3.0.3...v4.0.0)
|
354
367
|
|
355
|
-
## [v3.0.3](https://github.com/
|
368
|
+
## [v3.0.3](https://github.com/Foodcritic/foodcritic/tree/v3.0.3) (2013-10-13)
|
356
369
|
|
357
|
-
[Full Changelog](https://github.com/
|
370
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v3.0.2...v3.0.3)
|
358
371
|
|
359
|
-
## [v3.0.2](https://github.com/
|
372
|
+
## [v3.0.2](https://github.com/Foodcritic/foodcritic/tree/v3.0.2) (2013-10-05)
|
360
373
|
|
361
|
-
[Full Changelog](https://github.com/
|
374
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v3.0.1...v3.0.2)
|
362
375
|
|
363
|
-
## [v3.0.1](https://github.com/
|
376
|
+
## [v3.0.1](https://github.com/Foodcritic/foodcritic/tree/v3.0.1) (2013-09-25)
|
364
377
|
|
365
|
-
[Full Changelog](https://github.com/
|
378
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v3.0.0...v3.0.1)
|
366
379
|
|
367
380
|
**Implemented enhancements:**
|
368
381
|
|
369
|
-
- Roles rules [#19](https://github.com/
|
382
|
+
- Roles rules [#19](https://github.com/Foodcritic/foodcritic/issues/19)
|
370
383
|
|
371
|
-
## [v3.0.0](https://github.com/
|
384
|
+
## [v3.0.0](https://github.com/Foodcritic/foodcritic/tree/v3.0.0) (2013-09-14)
|
372
385
|
|
373
|
-
[Full Changelog](https://github.com/
|
386
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v2.2.0...v3.0.0)
|
374
387
|
|
375
388
|
**Implemented enhancements:**
|
376
389
|
|
377
|
-
- Provide a comprehensive list of `tags` somewhere on the docs [#63](https://github.com/
|
390
|
+
- Provide a comprehensive list of `tags` somewhere on the docs [#63](https://github.com/Foodcritic/foodcritic/issues/63)
|
378
391
|
|
379
392
|
**Fixed bugs:**
|
380
393
|
|
381
|
-
- FC001, FC019 shouldn't match on node.run_state [#66](https://github.com/
|
394
|
+
- FC001, FC019 shouldn't match on node.run_state [#66](https://github.com/Foodcritic/foodcritic/issues/66)
|
382
395
|
|
383
|
-
## [v2.2.0](https://github.com/
|
396
|
+
## [v2.2.0](https://github.com/Foodcritic/foodcritic/tree/v2.2.0) (2013-07-10)
|
384
397
|
|
385
|
-
[Full Changelog](https://github.com/
|
398
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v2.1.0...v2.2.0)
|
386
399
|
|
387
|
-
## [v2.1.0](https://github.com/
|
400
|
+
## [v2.1.0](https://github.com/Foodcritic/foodcritic/tree/v2.1.0) (2013-04-16)
|
388
401
|
|
389
|
-
[Full Changelog](https://github.com/
|
402
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v2.0.1...v2.1.0)
|
390
403
|
|
391
404
|
**Implemented enhancements:**
|
392
405
|
|
393
|
-
- New Rule Proposal: ||= considered harmful with attributes [#52](https://github.com/
|
394
|
-
- Would like to be able to exempt rules in cookbooks [#10](https://github.com/
|
406
|
+
- New Rule Proposal: ||= considered harmful with attributes [#52](https://github.com/Foodcritic/foodcritic/issues/52)
|
407
|
+
- Would like to be able to exempt rules in cookbooks [#10](https://github.com/Foodcritic/foodcritic/issues/10)
|
395
408
|
|
396
|
-
## [v2.0.1](https://github.com/
|
409
|
+
## [v2.0.1](https://github.com/Foodcritic/foodcritic/tree/v2.0.1) (2013-03-31)
|
397
410
|
|
398
|
-
[Full Changelog](https://github.com/
|
411
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v2.0.0...v2.0.1)
|
399
412
|
|
400
|
-
## [v2.0.0](https://github.com/
|
413
|
+
## [v2.0.0](https://github.com/Foodcritic/foodcritic/tree/v2.0.0) (2013-03-24)
|
401
414
|
|
402
|
-
[Full Changelog](https://github.com/
|
415
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.7.0...v2.0.0)
|
403
416
|
|
404
417
|
**Implemented enhancements:**
|
405
418
|
|
406
|
-
- New Rule: Check for existence of 'name' in metadata.rb [#64](https://github.com/
|
407
|
-
- New Rule: action ":none" vs ":nothing" [#61](https://github.com/
|
419
|
+
- New Rule: Check for existence of 'name' in metadata.rb [#64](https://github.com/Foodcritic/foodcritic/issues/64)
|
420
|
+
- New Rule: action ":none" vs ":nothing" [#61](https://github.com/Foodcritic/foodcritic/issues/61)
|
408
421
|
|
409
422
|
**Fixed bugs:**
|
410
423
|
|
411
|
-
- Incorrectly decoding attributes within a block [#76](https://github.com/
|
412
|
-
- FC003 doesn't match unless statements [#58](https://github.com/
|
413
|
-
- FC019 triggered on internal recipe hash key as symbol instead of node [#54](https://github.com/
|
424
|
+
- Incorrectly decoding attributes within a block [#76](https://github.com/Foodcritic/foodcritic/issues/76)
|
425
|
+
- FC003 doesn't match unless statements [#58](https://github.com/Foodcritic/foodcritic/issues/58)
|
426
|
+
- FC019 triggered on internal recipe hash key as symbol instead of node [#54](https://github.com/Foodcritic/foodcritic/issues/54)
|
414
427
|
|
415
|
-
## [v1.7.0](https://github.com/
|
428
|
+
## [v1.7.0](https://github.com/Foodcritic/foodcritic/tree/v1.7.0) (2012-12-27)
|
416
429
|
|
417
|
-
[Full Changelog](https://github.com/
|
430
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.6.1...v1.7.0)
|
418
431
|
|
419
432
|
**Fixed bugs:**
|
420
433
|
|
421
|
-
- FC037 false positive for subscribes [#65](https://github.com/
|
422
|
-
- Foodcritic not being fully deterministic. [#55](https://github.com/
|
434
|
+
- FC037 false positive for subscribes [#65](https://github.com/Foodcritic/foodcritic/issues/65)
|
435
|
+
- Foodcritic not being fully deterministic. [#55](https://github.com/Foodcritic/foodcritic/issues/55)
|
423
436
|
|
424
|
-
## [v1.6.1](https://github.com/
|
437
|
+
## [v1.6.1](https://github.com/Foodcritic/foodcritic/tree/v1.6.1) (2012-08-30)
|
425
438
|
|
426
|
-
[Full Changelog](https://github.com/
|
439
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.6.0...v1.6.1)
|
427
440
|
|
428
|
-
## [v1.6.0](https://github.com/
|
441
|
+
## [v1.6.0](https://github.com/Foodcritic/foodcritic/tree/v1.6.0) (2012-08-28)
|
429
442
|
|
430
|
-
[Full Changelog](https://github.com/
|
443
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.5.0...v1.6.0)
|
431
444
|
|
432
445
|
**Implemented enhancements:**
|
433
446
|
|
434
|
-
- Thoughts on more style-y lint checks [#15](https://github.com/
|
447
|
+
- Thoughts on more style-y lint checks [#15](https://github.com/Foodcritic/foodcritic/issues/15)
|
435
448
|
|
436
449
|
**Fixed bugs:**
|
437
450
|
|
438
|
-
- FC020 triggered on non-ruby shell command [#30](https://github.com/
|
439
|
-
- Incorrect FC019 alarms [#22](https://github.com/
|
451
|
+
- FC020 triggered on non-ruby shell command [#30](https://github.com/Foodcritic/foodcritic/issues/30)
|
452
|
+
- Incorrect FC019 alarms [#22](https://github.com/Foodcritic/foodcritic/issues/22)
|
440
453
|
|
441
|
-
## [v1.5.0](https://github.com/
|
454
|
+
## [v1.5.0](https://github.com/Foodcritic/foodcritic/tree/v1.5.0) (2012-08-20)
|
442
455
|
|
443
|
-
[Full Changelog](https://github.com/
|
456
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.5.1...v1.5.0)
|
444
457
|
|
445
|
-
## [v1.5.1](https://github.com/
|
458
|
+
## [v1.5.1](https://github.com/Foodcritic/foodcritic/tree/v1.5.1) (2012-08-20)
|
446
459
|
|
447
|
-
[Full Changelog](https://github.com/
|
460
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.4.0...v1.5.1)
|
448
461
|
|
449
462
|
**Fixed bugs:**
|
450
463
|
|
451
|
-
- FC007 should not be triggered by include_recipe "#{cookbook_name}::blah" [#44](https://github.com/
|
452
|
-
- FC022 block name check appears to be too simplistic [#29](https://github.com/
|
464
|
+
- FC007 should not be triggered by include_recipe "#{cookbook_name}::blah" [#44](https://github.com/Foodcritic/foodcritic/issues/44)
|
465
|
+
- FC022 block name check appears to be too simplistic [#29](https://github.com/Foodcritic/foodcritic/issues/29)
|
453
466
|
|
454
|
-
## [v1.4.0](https://github.com/
|
467
|
+
## [v1.4.0](https://github.com/Foodcritic/foodcritic/tree/v1.4.0) (2012-06-15)
|
455
468
|
|
456
|
-
[Full Changelog](https://github.com/
|
469
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.3.1...v1.4.0)
|
457
470
|
|
458
|
-
## [v1.3.1](https://github.com/
|
471
|
+
## [v1.3.1](https://github.com/Foodcritic/foodcritic/tree/v1.3.1) (2012-06-09)
|
459
472
|
|
460
|
-
[Full Changelog](https://github.com/
|
473
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.3.0...v1.3.1)
|
461
474
|
|
462
475
|
**Implemented enhancements:**
|
463
476
|
|
464
|
-
- catch pry breakpoints [#36](https://github.com/
|
477
|
+
- catch pry breakpoints [#36](https://github.com/Foodcritic/foodcritic/issues/36)
|
465
478
|
|
466
479
|
**Fixed bugs:**
|
467
480
|
|
468
|
-
- resource_attributes should show all of the relevant part of the AST [#31](https://github.com/
|
469
|
-
- FC003 is triggered, despite being handled [#26](https://github.com/
|
481
|
+
- resource_attributes should show all of the relevant part of the AST [#31](https://github.com/Foodcritic/foodcritic/issues/31)
|
482
|
+
- FC003 is triggered, despite being handled [#26](https://github.com/Foodcritic/foodcritic/issues/26)
|
470
483
|
|
471
|
-
## [v1.3.0](https://github.com/
|
484
|
+
## [v1.3.0](https://github.com/Foodcritic/foodcritic/tree/v1.3.0) (2012-05-21)
|
472
485
|
|
473
|
-
[Full Changelog](https://github.com/
|
486
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.2.0...v1.3.0)
|
474
487
|
|
475
|
-
## [v1.2.0](https://github.com/
|
488
|
+
## [v1.2.0](https://github.com/Foodcritic/foodcritic/tree/v1.2.0) (2012-04-21)
|
476
489
|
|
477
|
-
[Full Changelog](https://github.com/
|
490
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.1.0...v1.2.0)
|
478
491
|
|
479
|
-
## [v1.1.0](https://github.com/
|
492
|
+
## [v1.1.0](https://github.com/Foodcritic/foodcritic/tree/v1.1.0) (2012-03-25)
|
480
493
|
|
481
|
-
[Full Changelog](https://github.com/
|
494
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.0.1...v1.1.0)
|
482
495
|
|
483
496
|
**Fixed bugs:**
|
484
497
|
|
485
|
-
- ruby segfault / foodcritic 1.0.0 / nokogiri 1.5.2 [#18](https://github.com/
|
498
|
+
- ruby segfault / foodcritic 1.0.0 / nokogiri 1.5.2 [#18](https://github.com/Foodcritic/foodcritic/issues/18)
|
486
499
|
|
487
|
-
## [v1.0.1](https://github.com/
|
500
|
+
## [v1.0.1](https://github.com/Foodcritic/foodcritic/tree/v1.0.1) (2012-03-15)
|
488
501
|
|
489
|
-
[Full Changelog](https://github.com/
|
502
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v1.0.0...v1.0.1)
|
490
503
|
|
491
504
|
**Implemented enhancements:**
|
492
505
|
|
493
|
-
- rules in code? [#8](https://github.com/
|
506
|
+
- rules in code? [#8](https://github.com/Foodcritic/foodcritic/issues/8)
|
494
507
|
|
495
|
-
## [v1.0.0](https://github.com/
|
508
|
+
## [v1.0.0](https://github.com/Foodcritic/foodcritic/tree/v1.0.0) (2012-03-04)
|
496
509
|
|
497
|
-
[Full Changelog](https://github.com/
|
510
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.11.1...v1.0.0)
|
498
511
|
|
499
512
|
**Implemented enhancements:**
|
500
513
|
|
501
|
-
- Foodcritic doesn't have a -v [#16](https://github.com/
|
514
|
+
- Foodcritic doesn't have a -v [#16](https://github.com/Foodcritic/foodcritic/issues/16)
|
502
515
|
|
503
516
|
**Fixed bugs:**
|
504
517
|
|
505
|
-
- FC003: Recognise updated chef-solo-search [#17](https://github.com/
|
506
|
-
- foodcritic v10 and v11 have conflicting yajl-ruby dependencies with chef [#14](https://github.com/
|
518
|
+
- FC003: Recognise updated chef-solo-search [#17](https://github.com/Foodcritic/foodcritic/issues/17)
|
519
|
+
- foodcritic v10 and v11 have conflicting yajl-ruby dependencies with chef [#14](https://github.com/Foodcritic/foodcritic/issues/14)
|
507
520
|
|
508
|
-
## [v0.11.1](https://github.com/
|
521
|
+
## [v0.11.1](https://github.com/Foodcritic/foodcritic/tree/v0.11.1) (2012-02-29)
|
509
522
|
|
510
|
-
[Full Changelog](https://github.com/
|
523
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.11.0...v0.11.1)
|
511
524
|
|
512
525
|
**Implemented enhancements:**
|
513
526
|
|
514
|
-
- Want "all" arg to '-f' option. [#11](https://github.com/
|
527
|
+
- Want "all" arg to '-f' option. [#11](https://github.com/Foodcritic/foodcritic/issues/11)
|
515
528
|
|
516
529
|
**Fixed bugs:**
|
517
530
|
|
518
|
-
- Epic fail fail? [#13](https://github.com/
|
531
|
+
- Epic fail fail? [#13](https://github.com/Foodcritic/foodcritic/issues/13)
|
519
532
|
|
520
|
-
## [v0.11.0](https://github.com/
|
533
|
+
## [v0.11.0](https://github.com/Foodcritic/foodcritic/tree/v0.11.0) (2012-02-22)
|
521
534
|
|
522
|
-
[Full Changelog](https://github.com/
|
535
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.10.0...v0.11.0)
|
523
536
|
|
524
537
|
**Fixed bugs:**
|
525
538
|
|
526
|
-
- Numeric value for mode should be 5 digits (CHEF-174) [#9](https://github.com/
|
539
|
+
- Numeric value for mode should be 5 digits (CHEF-174) [#9](https://github.com/Foodcritic/foodcritic/pull/9) ([aia](https://github.com/aia))
|
527
540
|
|
528
|
-
## [v0.10.0](https://github.com/
|
541
|
+
## [v0.10.0](https://github.com/Foodcritic/foodcritic/tree/v0.10.0) (2012-02-20)
|
529
542
|
|
530
|
-
[Full Changelog](https://github.com/
|
543
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.9.0...v0.10.0)
|
531
544
|
|
532
|
-
## [v0.9.0](https://github.com/
|
545
|
+
## [v0.9.0](https://github.com/Foodcritic/foodcritic/tree/v0.9.0) (2012-01-26)
|
533
546
|
|
534
|
-
[Full Changelog](https://github.com/
|
547
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.8.1...v0.9.0)
|
535
548
|
|
536
|
-
## [v0.8.1](https://github.com/
|
549
|
+
## [v0.8.1](https://github.com/Foodcritic/foodcritic/tree/v0.8.1) (2012-01-20)
|
537
550
|
|
538
|
-
[Full Changelog](https://github.com/
|
551
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.8.0...v0.8.1)
|
539
552
|
|
540
|
-
## [v0.8.0](https://github.com/
|
553
|
+
## [v0.8.0](https://github.com/Foodcritic/foodcritic/tree/v0.8.0) (2012-01-19)
|
541
554
|
|
542
|
-
[Full Changelog](https://github.com/
|
555
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.7.0...v0.8.0)
|
543
556
|
|
544
557
|
**Fixed bugs:**
|
545
558
|
|
546
|
-
- Don't raise FC003 warning if chef-solo-search is installed [#7](https://github.com/
|
559
|
+
- Don't raise FC003 warning if chef-solo-search is installed [#7](https://github.com/Foodcritic/foodcritic/issues/7)
|
547
560
|
|
548
|
-
## [v0.7.0](https://github.com/
|
561
|
+
## [v0.7.0](https://github.com/Foodcritic/foodcritic/tree/v0.7.0) (2011-12-31)
|
549
562
|
|
550
|
-
[Full Changelog](https://github.com/
|
563
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.6.0...v0.7.0)
|
551
564
|
|
552
|
-
## [v0.6.0](https://github.com/
|
565
|
+
## [v0.6.0](https://github.com/Foodcritic/foodcritic/tree/v0.6.0) (2011-12-18)
|
553
566
|
|
554
|
-
[Full Changelog](https://github.com/
|
567
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.5.2...v0.6.0)
|
555
568
|
|
556
569
|
**Fixed bugs:**
|
557
570
|
|
558
|
-
- Bundler fails to resolve JSON version [#6](https://github.com/
|
571
|
+
- Bundler fails to resolve JSON version [#6](https://github.com/Foodcritic/foodcritic/issues/6)
|
559
572
|
|
560
|
-
## [v0.5.2](https://github.com/
|
573
|
+
## [v0.5.2](https://github.com/Foodcritic/foodcritic/tree/v0.5.2) (2011-12-15)
|
561
574
|
|
562
|
-
[Full Changelog](https://github.com/
|
575
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.5.1...v0.5.2)
|
563
576
|
|
564
|
-
## [v0.5.1](https://github.com/
|
577
|
+
## [v0.5.1](https://github.com/Foodcritic/foodcritic/tree/v0.5.1) (2011-12-14)
|
565
578
|
|
566
|
-
[Full Changelog](https://github.com/
|
579
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.5.0...v0.5.1)
|
567
580
|
|
568
|
-
## [v0.5.0](https://github.com/
|
581
|
+
## [v0.5.0](https://github.com/Foodcritic/foodcritic/tree/v0.5.0) (2011-12-13)
|
569
582
|
|
570
|
-
[Full Changelog](https://github.com/
|
583
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.4.0...v0.5.0)
|
571
584
|
|
572
|
-
## [v0.4.0](https://github.com/
|
585
|
+
## [v0.4.0](https://github.com/Foodcritic/foodcritic/tree/v0.4.0) (2011-12-10)
|
573
586
|
|
574
|
-
[Full Changelog](https://github.com/
|
587
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.3.0...v0.4.0)
|
575
588
|
|
576
|
-
## [v0.3.0](https://github.com/
|
589
|
+
## [v0.3.0](https://github.com/Foodcritic/foodcritic/tree/v0.3.0) (2011-12-04)
|
577
590
|
|
578
|
-
[Full Changelog](https://github.com/
|
591
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.2.0...v0.3.0)
|
579
592
|
|
580
|
-
## [v0.2.0](https://github.com/
|
593
|
+
## [v0.2.0](https://github.com/Foodcritic/foodcritic/tree/v0.2.0) (2011-12-01)
|
581
594
|
|
582
|
-
[Full Changelog](https://github.com/
|
595
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/v0.1.0...v0.2.0)
|
583
596
|
|
584
|
-
## [v0.1.0](https://github.com/
|
597
|
+
## [v0.1.0](https://github.com/Foodcritic/foodcritic/tree/v0.1.0) (2011-11-30)
|
585
598
|
|
586
|
-
[Full Changelog](https://github.com/
|
599
|
+
[Full Changelog](https://github.com/Foodcritic/foodcritic/compare/4257264aa0bf93e3d13851ac0343a6b25ca3d316...v0.1.0)
|
587
600
|
|
588
601
|
- _This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)_
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Foodcritic
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/Foodcritic/foodcritic.svg?branch=master)](https://travis-ci.org/Foodcritic/foodcritic) [![Gem Version](https://badge.fury.io/rb/foodcritic.svg)](http://badge.fury.io/rb/foodcritic)
|
4
4
|
|
5
5
|
Foodcritic is a code linting tool for writing better and safer Chef cookbooks that runs both as a command line tool and as a Rake task. Out of the box Foodcritic contains over 70 cookbook rules, and plugin system for writing your own rules.
|
6
6
|
|
@@ -68,11 +68,11 @@ $ docker run -it --rm -v ~/cookbooks:/cookbooks foodcritic/foodcritic "/cookbook
|
|
68
68
|
|
69
69
|
## License
|
70
70
|
|
71
|
-
MIT - see the accompanying [LICENSE](https://github.com/
|
71
|
+
MIT - see the accompanying [LICENSE](https://github.com/Foodcritic/foodcritic/blob/master/LICENSE) file for details.
|
72
72
|
|
73
73
|
## Changelog
|
74
74
|
|
75
|
-
To see what has changed in recent versions see the [CHANGELOG](https://github.com/
|
75
|
+
To see what has changed in recent versions see the [CHANGELOG](https://github.com/Foodcritic/foodcritic/blob/master/CHANGELOG.md). Foodcritic follows the [Rubygems Semantic Versioning Policy](http://guides.rubygems.org/patterns/#semantic-versioning).
|
76
76
|
|
77
77
|
## Contributing
|
78
78
|
|
@@ -30,9 +30,8 @@ Feature: Check for missing template
|
|
30
30
|
When I check the cookbook specifying <version> as the Chef version
|
31
31
|
Then the missing template warning 033 <warning>
|
32
32
|
Examples:
|
33
|
-
| version
|
34
|
-
|
|
35
|
-
| 12.0.0 | should not be displayed |
|
33
|
+
| version | warning |
|
34
|
+
| 12.9.38 | should not be displayed |
|
36
35
|
|
37
36
|
Scenario: Template within deploy resource
|
38
37
|
Given a cookbook recipe with a deploy resource that contains a template resource
|
@@ -46,7 +46,7 @@ module FoodCritic
|
|
46
46
|
"FC030" => "Cookbook contains debugger breakpoints",
|
47
47
|
"FC031" => "Cookbook without metadata.rb file",
|
48
48
|
"FC032" => "Invalid notification timing",
|
49
|
-
"FC033" => "Missing template",
|
49
|
+
"FC033" => "Missing template file",
|
50
50
|
"FC034" => "Unused template variables",
|
51
51
|
"FC037" => "Invalid notification action",
|
52
52
|
"FC038" => "Invalid resource action",
|
@@ -93,11 +93,9 @@ module FoodCritic
|
|
93
93
|
|
94
94
|
# Capture an error expected when calling a command.
|
95
95
|
def capture_error
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
rescue => @error
|
100
|
-
end
|
96
|
+
yield
|
97
|
+
@error = all_output unless last_exit_status == 0
|
98
|
+
rescue => @error
|
101
99
|
end
|
102
100
|
|
103
101
|
# Return the last error captured
|
data/foodcritic.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency("nokogiri", ">= 1.5", "< 2.0")
|
24
24
|
s.add_dependency("rake")
|
25
25
|
s.add_dependency("treetop", "~> 1.4")
|
26
|
-
s.add_dependency("yajl
|
26
|
+
s.add_dependency("ffi-yajl", "~> 2.0")
|
27
27
|
s.add_dependency("erubis")
|
28
28
|
s.add_dependency("rufus-lru", "~> 1.0")
|
29
29
|
|
data/lib/foodcritic.rb
CHANGED
data/lib/foodcritic/api.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "nokogiri"
|
2
2
|
require "rufus-lru"
|
3
|
-
require "json"
|
4
3
|
|
5
4
|
module FoodCritic
|
6
5
|
# Helper methods that form part of the Rules DSL.
|
@@ -424,8 +423,8 @@ module FoodCritic
|
|
424
423
|
|
425
424
|
file = File.read(filename)
|
426
425
|
begin
|
427
|
-
|
428
|
-
rescue
|
426
|
+
FFI_Yajl::Parser.parse(file)
|
427
|
+
rescue FFI_Yajl::ParseError
|
429
428
|
raise "File #{filename} does not appear to contain valid JSON"
|
430
429
|
end
|
431
430
|
end
|
data/lib/foodcritic/chef.rb
CHANGED
@@ -46,7 +46,7 @@ module FoodCritic
|
|
46
46
|
# The DSL metadata doesn't necessarily reflect the version of Chef in the
|
47
47
|
# local user gemset.
|
48
48
|
def load_metadata
|
49
|
-
version = if
|
49
|
+
version = if respond_to?(:chef_version)
|
50
50
|
chef_version
|
51
51
|
else
|
52
52
|
Linter::DEFAULT_CHEF_VERSION
|
@@ -55,7 +55,7 @@ module FoodCritic
|
|
55
55
|
Linter::DEFAULT_CHEF_VERSION].map do |version|
|
56
56
|
metadata_path(version)
|
57
57
|
end.find { |m| File.exist?(m) }
|
58
|
-
@dsl_metadata ||=
|
58
|
+
@dsl_metadata ||= FFI_Yajl::Parser.parse(IO.read(metadata_path),
|
59
59
|
symbolize_keys: true)
|
60
60
|
end
|
61
61
|
|
@@ -2,6 +2,7 @@ rule "FC001",
|
|
2
2
|
"Use strings in preference to symbols to access node attributes" do
|
3
3
|
tags %w{style attributes}
|
4
4
|
recipe do |ast|
|
5
|
-
|
5
|
+
# node.run_state is not actually an attribute so ignore that
|
6
|
+
attribute_access(ast, type: :symbol, ignore: "run_state")
|
6
7
|
end
|
7
8
|
end
|
@@ -21,9 +21,7 @@ rule "FC019", "Access node attributes in a consistent manner" do
|
|
21
21
|
}
|
22
22
|
end.reject { |type| type[:count] == 0 }
|
23
23
|
if asts.size > 1
|
24
|
-
least_used = asts[types.
|
25
|
-
a[:count] <=> b[:count]
|
26
|
-
end[:access_type]]
|
24
|
+
least_used = asts[types.min_by { |a| a[:count] }[:access_type]]
|
27
25
|
least_used.map do |file|
|
28
26
|
file[:ast].map do |ast|
|
29
27
|
match(ast).merge(filename: file[:path])
|
@@ -1,23 +1,31 @@
|
|
1
|
-
rule "FC033", "Missing template" do
|
1
|
+
rule "FC033", "Missing template file" do
|
2
2
|
tags %w{correctness templates}
|
3
3
|
recipe do |ast, filename|
|
4
|
+
# find all template resources that don't fetch a template
|
5
|
+
# from either another cookbook or a local path
|
4
6
|
find_resources(ast, type: :template).reject do |resource|
|
5
7
|
resource_attributes(resource)["local"] ||
|
6
8
|
resource_attributes(resource)["cookbook"]
|
7
9
|
end.map do |resource|
|
10
|
+
# fetch the specified file to the template
|
8
11
|
file = template_file(resource_attributes(resource,
|
9
12
|
return_expressions: true))
|
10
13
|
{ resource: resource, file: file }
|
11
14
|
end.reject do |resource|
|
15
|
+
# skip the check if the file path is derived since
|
16
|
+
# we can't determine if that's here or not without converging the node
|
12
17
|
resource[:file].respond_to?(:xpath)
|
13
18
|
end.select do |resource|
|
14
19
|
template_paths(filename).none? do |path|
|
15
20
|
relative_path = []
|
16
21
|
Pathname.new(path).ascend do |template_path|
|
17
22
|
relative_path << template_path.basename
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
# stop building relative path if we've hit template or 1 dir above
|
24
|
+
# NOTE: This is a totally flawed attempt to strip things like
|
25
|
+
# templates/ubuntu/something.erb down to something.erb, which breaks
|
26
|
+
# legit nested dirs in the templates dir like templates/something/something.erb
|
27
|
+
break if template_path.dirname.basename.to_s == "templates" ||
|
28
|
+
template_path.dirname.dirname.basename.to_s == "templates"
|
21
29
|
end
|
22
30
|
File.join(relative_path.reverse) == resource[:file]
|
23
31
|
end
|
data/lib/foodcritic/version.rb
CHANGED
data/man/foodcritic.1
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
.\" generated with Ronn/v0.7.3
|
2
|
+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
|
+
.
|
4
|
+
.TH "FOODCRITIC" "1" "April 2017" "" ""
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBfoodcritic\fR \- lint tool for chef cookbooks
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBfoodcritic\fR [\fIoptions\fR\.\.\.] \fIcookbook\fR\.\.\.
|
11
|
+
.
|
12
|
+
.P
|
13
|
+
\fBfoodcritic\fR [\fIoptions\fR\.\.\.] \-\-list
|
14
|
+
.
|
15
|
+
.SH "DESCRIPTION"
|
16
|
+
\fBfoodcritic\fR makes it easier to flag problems in your Chef cookbooks that will cause Chef to blow up when you attempt to converge\. This is about faster feedback\.
|
17
|
+
.
|
18
|
+
.P
|
19
|
+
Each \fBcookbook\fR path specified will be examined for common problems and poor style\.
|
20
|
+
.
|
21
|
+
.SH "OPTIONS"
|
22
|
+
.
|
23
|
+
.TP
|
24
|
+
\fB\-t\fR, \fB\-\-tags\fR \fITAGS\fR
|
25
|
+
Only check against rules with the specified tags\. Prefix tags with a tilde \fB~\fR to exclude rules\.
|
26
|
+
.
|
27
|
+
.TP
|
28
|
+
\fB\-l\fR, \fB\-\-list\fR
|
29
|
+
Do not perform a lint check; instead simply list the rules that would be enabled based on the defaults and the rule selection options (\-t, \-I)
|
30
|
+
.
|
31
|
+
.TP
|
32
|
+
\fB\-f\fR, \fB\-\-epic\-fail\fR \fITAGS\fR
|
33
|
+
Exit non\-zero if any of the specified tags are matched\. Use the pseudo\-tag \fBany\fR to fail if any tag is matched\.
|
34
|
+
.
|
35
|
+
.TP
|
36
|
+
\fB\-c\fR, \fB\-\-chef\-version\fR \fIVERSION\fR
|
37
|
+
Only check against rules valid for this version of Chef\.
|
38
|
+
.
|
39
|
+
.TP
|
40
|
+
\fB\-B\fR, \fB\-\-cookbook\-path\fR
|
41
|
+
Cookbook path(s) to check\.
|
42
|
+
.
|
43
|
+
.TP
|
44
|
+
\fB\-C\fR, \fB\-\-\fR[\fBno\-\fR]\fBcontext\fR
|
45
|
+
Show lines matched against rather than the default summary\.
|
46
|
+
.
|
47
|
+
.TP
|
48
|
+
\fB\-E\fR, \fB\-\-environment\-path\fR
|
49
|
+
Environment path(s) to check\.
|
50
|
+
.
|
51
|
+
.TP
|
52
|
+
\fB\-I\fR, \fB\-\-include\fR \fIPATH\fR
|
53
|
+
Additional rule file path(s) to load\.
|
54
|
+
.
|
55
|
+
.TP
|
56
|
+
\fB\-R\fR, \fB\-\-role\-path\fR
|
57
|
+
Role path(s) to check\.
|
58
|
+
.
|
59
|
+
.TP
|
60
|
+
\fB\-S\fR, \fB\-\-search\-grammar\fR \fIPATH\fR
|
61
|
+
Specify grammar to use when validating search syntax\. (Default: the grammar of any installed Chef)
|
62
|
+
.
|
63
|
+
.TP
|
64
|
+
\fB\-V\fR, \fB\-\-version\fR
|
65
|
+
Display the foodcritic version\.
|
66
|
+
.
|
67
|
+
.TP
|
68
|
+
\fB\-X\fR, \fB\-\-exclude\fR \fIPATH\fR
|
69
|
+
Exclude path(s) from being linted\.
|
70
|
+
.
|
71
|
+
.SH "RETURN VALUES"
|
72
|
+
By default, \fBfoodcritic\fR will always return \fB0\fR\.
|
73
|
+
.
|
74
|
+
.P
|
75
|
+
If \fB\-\-epic\-fail\fR is specified, then \fBfoodcritic\fR will return \fB3\fR if any tags are matched\.
|
76
|
+
.
|
77
|
+
.SH "COPYRIGHT"
|
78
|
+
\fBfoodcritic\fR is Copyright 2011 by Andrew Crump\.
|
79
|
+
.
|
80
|
+
.SH "SEE ALSO"
|
81
|
+
chef(1)
|
@@ -6,6 +6,11 @@ describe "FC001" do
|
|
6
6
|
it { is_expected.to violate_rule("FC001") }
|
7
7
|
end
|
8
8
|
|
9
|
+
context "with a cookbook with a single recipe that references the node run_state" do
|
10
|
+
recipe_file "node.run_state[:foo]\n"
|
11
|
+
it { is_expected.not_to violate_rule("FC001") }
|
12
|
+
end
|
13
|
+
|
9
14
|
context "with a cookbook with a single recipe that accesses multiple node attributes via symbols" do
|
10
15
|
recipe_file "node[:foo] = 'bar'\nnode[:testing] = 'bar'\n"
|
11
16
|
it { is_expected.to violate_rule("FC001") }
|
@@ -1,6 +1,3 @@
|
|
1
|
-
FC001: Use strings in preference to symbols to access node attributes: ./providers/reboot.rb:22
|
2
|
-
FC001: Use strings in preference to symbols to access node attributes: ./providers/reboot.rb:23
|
3
|
-
FC001: Use strings in preference to symbols to access node attributes: ./providers/reboot.rb:24
|
4
1
|
FC002: Avoid string interpolation where not required: ./libraries/registry_helper.rb:99
|
5
2
|
FC002: Avoid string interpolation where not required: ./libraries/registry_helper.rb:173
|
6
3
|
FC002: Avoid string interpolation where not required: ./libraries/windows_privileged.rb:42
|
data/spec/unit/api_spec.rb
CHANGED
@@ -1928,7 +1928,7 @@ describe FoodCritic::Api do
|
|
1928
1928
|
it "raises if the json is not valid" do
|
1929
1929
|
expect(::File).to receive(:exist?).with("/some/path/with/a/file").and_return(true)
|
1930
1930
|
allow(File).to receive(:read).with("/some/path/with/a/file").and_return("I am bogus data")
|
1931
|
-
expect { api.json_file_to_hash("/some/path/with/a/file") }.to raise_error
|
1931
|
+
expect { api.json_file_to_hash("/some/path/with/a/file") }.to raise_error RuntimeError
|
1932
1932
|
end
|
1933
1933
|
end
|
1934
1934
|
|
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: 11.
|
4
|
+
version: 11.3.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: 2017-
|
11
|
+
date: 2017-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-core
|
@@ -73,19 +73,19 @@ dependencies:
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '1.4'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
|
-
name: yajl
|
76
|
+
name: ffi-yajl
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '2.0'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '2.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: erubis
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -331,6 +331,7 @@ files:
|
|
331
331
|
- lib/foodcritic/template.rb
|
332
332
|
- lib/foodcritic/version.rb
|
333
333
|
- lib/foodcritic/xml.rb
|
334
|
+
- man/foodcritic.1
|
334
335
|
- man/foodcritic.1.ronn
|
335
336
|
- misc/lucene.treetop
|
336
337
|
- spec/functional/fc001_spec.rb
|
@@ -507,5 +508,5 @@ rubyforge_project:
|
|
507
508
|
rubygems_version: 2.6.12
|
508
509
|
signing_key:
|
509
510
|
specification_version: 4
|
510
|
-
summary: foodcritic-11.
|
511
|
+
summary: foodcritic-11.3.0
|
511
512
|
test_files: []
|