inspecstyle 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +12 -7
  5. data/README.md +39 -1
  6. data/Rakefile +3 -0
  7. data/config/default.yml +95 -2
  8. data/doc/RuboCop.html +128 -0
  9. data/doc/RuboCop/Cop.html +117 -0
  10. data/doc/RuboCop/Cop/InSpecStyle.html +117 -0
  11. data/doc/RuboCop/Cop/InSpecStyle/AzureGenericResource.html +249 -0
  12. data/doc/RuboCop/Cop/InSpecStyle/DeprecatedAttributes.html +310 -0
  13. data/doc/RuboCop/Cop/InSpecStyle/FirstCop.html +345 -0
  14. data/doc/RuboCop/InSpecStyle.html +140 -0
  15. data/doc/RuboCop/InSpecStyle/Error.html +124 -0
  16. data/doc/RuboCop/InSpecStyle/Inject.html +195 -0
  17. data/doc/_index.html +211 -0
  18. data/doc/class_list.html +51 -0
  19. data/doc/css/common.css +1 -0
  20. data/doc/css/full_list.css +58 -0
  21. data/doc/css/style.css +496 -0
  22. data/doc/file.README.html +131 -0
  23. data/doc/file_list.html +56 -0
  24. data/doc/frames.html +17 -0
  25. data/doc/index.html +131 -0
  26. data/doc/js/app.js +314 -0
  27. data/doc/js/full_list.js +216 -0
  28. data/doc/js/jquery.js +4 -0
  29. data/doc/method_list.html +99 -0
  30. data/doc/top-level-namespace.html +110 -0
  31. data/lib/rubocop/cop/inspecstyle/apache.rb +57 -0
  32. data/lib/rubocop/cop/inspecstyle/aws_iam_user_property.rb +96 -0
  33. data/lib/rubocop/cop/inspecstyle/azure_generic_resource.rb +35 -0
  34. data/lib/rubocop/cop/inspecstyle/deprecated_attributes.rb +16 -16
  35. data/lib/rubocop/cop/inspecstyle/file_be_mounted.rb +65 -0
  36. data/lib/rubocop/cop/inspecstyle/file_size.rb +77 -0
  37. data/lib/rubocop/cop/inspecstyle/host_proto.rb +71 -0
  38. data/lib/rubocop/cop/inspecstyle/iis_website.rb +36 -0
  39. data/lib/rubocop/cop/inspecstyle/linux_kernel_parameter.rb +41 -0
  40. data/lib/rubocop/cop/inspecstyle/mssql_session_pass.rb +59 -0
  41. data/lib/rubocop/cop/inspecstyle/oracle_db_session_pass.rb +59 -0
  42. data/lib/rubocop/cop/inspecstyle/ppa_resource.rb +36 -0
  43. data/lib/rubocop/cop/inspecstyle/processes_list.rb +77 -0
  44. data/lib/rubocop/cop/inspecstyle/script_resource.rb +48 -0
  45. data/lib/rubocop/cop/inspecstyle/shadow_properties.rb +83 -0
  46. data/lib/rubocop/cop/inspecstyle/users_resource_matchers.rb +98 -0
  47. data/lib/rubocop/cop/inspecstyle/windows_registry_key.rb +36 -0
  48. data/lib/rubocop/cop/inspecstyle/wmi_wmis_class.rb +37 -0
  49. data/lib/rubocop/cop/inspecstyle_cops.rb +17 -1
  50. data/lib/rubocop/inspecstyle/version.rb +1 -1
  51. data/notes-for-development.md +10 -0
  52. data/tasks/cops_documentation.rake +300 -0
  53. metadata +43 -3
  54. data/lib/rubocop/cop/inspecstyle/first_cop.rb +0 -69
@@ -0,0 +1,345 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: RuboCop::Cop::InSpecStyle::FirstCop
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "RuboCop::Cop::InSpecStyle::FirstCop";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (F)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">Cop</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../InSpecStyle.html" title="RuboCop::Cop::InSpecStyle (module)">InSpecStyle</a></span></span>
41
+ &raquo;
42
+ <span class="title">FirstCop</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: RuboCop::Cop::InSpecStyle::FirstCop
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../../Cop.html" title="RuboCop::Cop (module)">RuboCop::Cop</a></span></li>
78
+
79
+ <li class="next">RuboCop::Cop::InSpecStyle::FirstCop</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/rubocop/cop/inspecstyle/first_cop.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>TODO: Write cop description and example of bad / good code. For every `SupportedStyle` and unique configuration, there needs to be examples. Examples must have valid Ruby syntax. Do not use upticks.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+ <div class="examples">
115
+ <p class="tag_title">Examples:</p>
116
+
117
+
118
+ <p class="example_title"><div class='inline'>
119
+ <p>EnforcedStyle: bar (default)</p>
120
+ </div></p>
121
+
122
+ <pre class="example code"><code><span class='comment'># Description of the `bar` style.
123
+ </span>
124
+ <span class='comment'># bad
125
+ </span><span class='id identifier rubyid_bad_bar_method'>bad_bar_method</span>
126
+
127
+ <span class='comment'># bad
128
+ </span><span class='id identifier rubyid_bad_bar_method'>bad_bar_method</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
129
+
130
+ <span class='comment'># good
131
+ </span><span class='id identifier rubyid_good_bar_method'>good_bar_method</span>
132
+
133
+ <span class='comment'># good
134
+ </span><span class='id identifier rubyid_good_bar_method'>good_bar_method</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span></code></pre>
135
+
136
+
137
+ <p class="example_title"><div class='inline'>
138
+ <p>EnforcedStyle: foo</p>
139
+ </div></p>
140
+
141
+ <pre class="example code"><code><span class='comment'># Description of the `foo` style.
142
+ </span>
143
+ <span class='comment'># bad
144
+ </span><span class='id identifier rubyid_bad_foo_method'>bad_foo_method</span>
145
+
146
+ <span class='comment'># bad
147
+ </span><span class='id identifier rubyid_bad_foo_method'>bad_foo_method</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
148
+
149
+ <span class='comment'># good
150
+ </span><span class='id identifier rubyid_good_foo_method'>good_foo_method</span>
151
+
152
+ <span class='comment'># good
153
+ </span><span class='id identifier rubyid_good_foo_method'>good_foo_method</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span></code></pre>
154
+
155
+ </div>
156
+
157
+
158
+ </div>
159
+
160
+ <h2>
161
+ Constant Summary
162
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
163
+ </h2>
164
+
165
+ <dl class="constants">
166
+
167
+ <dt id="MSG-constant" class="">MSG =
168
+ <div class="docstring">
169
+ <div class="discussion">
170
+
171
+ <p>TODO: Implement the cop in here.</p>
172
+
173
+ <p>In many cases, you can use a node matcher for matching node pattern. See <a href="https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/node_pattern.rb">github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/node_pattern.rb</a></p>
174
+
175
+ <p>For example</p>
176
+
177
+
178
+ </div>
179
+ </div>
180
+ <div class="tags">
181
+
182
+
183
+ </div>
184
+ </dt>
185
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Use `#good_method` instead of `#bad_method`. %&lt;example_insertion&gt;</span><span class='tstring_end'>&#39;</span></span></pre></dd>
186
+
187
+ </dl>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <h2>
198
+ Instance Method Summary
199
+ <small><a href="#" class="summary_toggle">collapse</a></small>
200
+ </h2>
201
+
202
+ <ul class="summary">
203
+
204
+ <li class="public ">
205
+ <span class="summary_signature">
206
+
207
+ <a href="#autocorrect-instance_method" title="#autocorrect (instance method)">#<strong>autocorrect</strong>(node) &#x21d2; Object </a>
208
+
209
+
210
+
211
+ </span>
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <span class="summary_desc"><div class='inline'></div></span>
222
+
223
+ </li>
224
+
225
+
226
+ <li class="public ">
227
+ <span class="summary_signature">
228
+
229
+ <a href="#on_send-instance_method" title="#on_send (instance method)">#<strong>on_send</strong>(node) &#x21d2; Object </a>
230
+
231
+
232
+
233
+ </span>
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <span class="summary_desc"><div class='inline'></div></span>
244
+
245
+ </li>
246
+
247
+
248
+ </ul>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+ <div id="instance_method_details" class="method_details_list">
260
+ <h2>Instance Method Details</h2>
261
+
262
+
263
+ <div class="method_details first">
264
+ <h3 class="signature first" id="autocorrect-instance_method">
265
+
266
+ #<strong>autocorrect</strong>(node) &#x21d2; <tt>Object</tt>
267
+
268
+
269
+
270
+
271
+
272
+ </h3><table class="source_code">
273
+ <tr>
274
+ <td>
275
+ <pre class="lines">
276
+
277
+
278
+ 60
279
+ 61
280
+ 62
281
+ 63
282
+ 64
283
+ 65</pre>
284
+ </td>
285
+ <td>
286
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/first_cop.rb', line 60</span>
287
+
288
+ <span class='kw'>def</span> <span class='id identifier rubyid_autocorrect'>autocorrect</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
289
+ <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_corrector'>corrector</span><span class='rparen'>)</span> <span class='kw'>do</span>
290
+ <span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_insert_before'>insert_before</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_source_range'>source_range</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>good_method</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
291
+ <span class='id identifier rubyid_corrector'>corrector</span><span class='period'>.</span><span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_source_range'>source_range</span><span class='rparen'>)</span>
292
+ <span class='kw'>end</span>
293
+ <span class='kw'>end</span></pre>
294
+ </td>
295
+ </tr>
296
+ </table>
297
+ </div>
298
+
299
+ <div class="method_details ">
300
+ <h3 class="signature " id="on_send-instance_method">
301
+
302
+ #<strong>on_send</strong>(node) &#x21d2; <tt>Object</tt>
303
+
304
+
305
+
306
+
307
+
308
+ </h3><table class="source_code">
309
+ <tr>
310
+ <td>
311
+ <pre class="lines">
312
+
313
+
314
+ 54
315
+ 55
316
+ 56
317
+ 57
318
+ 58</pre>
319
+ </td>
320
+ <td>
321
+ <pre class="code"><span class="info file"># File 'lib/rubocop/cop/inspecstyle/first_cop.rb', line 54</span>
322
+
323
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_send'>on_send</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
324
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_bad_method?'>bad_method?</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
325
+ <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#MSG-constant" title="RuboCop::Cop::InSpecStyle::FirstCop::MSG (constant)">MSG</a></span></span><span class='comma'>,</span> <span class='label'>example_insertion:</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_source'>source</span><span class='rparen'>)</span>
326
+ <span class='id identifier rubyid_add_offense'>add_offense</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='label'>message:</span> <span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
327
+ <span class='kw'>end</span></pre>
328
+ </td>
329
+ </tr>
330
+ </table>
331
+ </div>
332
+
333
+ </div>
334
+
335
+ </div>
336
+
337
+ <div id="footer">
338
+ Generated on Thu Jun 11 11:57:48 2020 by
339
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
340
+ 0.9.25 (ruby-2.6.6).
341
+ </div>
342
+
343
+ </div>
344
+ </body>
345
+ </html>
@@ -0,0 +1,140 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: RuboCop::InSpecStyle
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "RuboCop::InSpecStyle";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (I)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../RuboCop.html" title="RuboCop (module)">RuboCop</a></span></span>
41
+ &raquo;
42
+ <span class="title">InSpecStyle</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: RuboCop::InSpecStyle
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/rubocop/inspecstyle.rb<span class="defines">,<br />
82
+ lib/rubocop/inspecstyle/inject.rb,<br /> lib/rubocop/inspecstyle/version.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="InSpecStyle/Inject.html" title="RuboCop::InSpecStyle::Inject (module)">Inject</a></span>
93
+
94
+
95
+
96
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="InSpecStyle/Error.html" title="RuboCop::InSpecStyle::Error (class)">Error</a></span>
97
+
98
+
99
+ </p>
100
+
101
+
102
+ <h2>
103
+ Constant Summary
104
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
105
+ </h2>
106
+
107
+ <dl class="constants">
108
+
109
+ <dt id="CONFIG-constant" class="">CONFIG =
110
+
111
+ </dt>
112
+ <dd><pre class="code"><span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_safe_load'>safe_load</span><span class='lparen'>(</span><span class='const'>CONFIG_DEFAULT</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
113
+
114
+ <dt id="VERSION-constant" class="">VERSION =
115
+
116
+ </dt>
117
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.3</span><span class='tstring_end'>&quot;</span></span></pre></dd>
118
+
119
+ </dl>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ </div>
131
+
132
+ <div id="footer">
133
+ Generated on Thu Jun 11 11:57:48 2020 by
134
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
135
+ 0.9.25 (ruby-2.6.6).
136
+ </div>
137
+
138
+ </div>
139
+ </body>
140
+ </html>