|
164 | 164 | ; Root test methods |
165 | 165 | (program |
166 | 166 | (call |
167 | | - method: (identifier) @run @name (#any-of? @run "describe" "context" "test" "it" "shared_examples") |
| 167 | + method: (identifier) @_run @name (#any-of? @_run "describe" "context" "test" "it" "shared_examples") |
168 | 168 | arguments: (argument_list . [ |
169 | 169 | (string) @name |
170 | 170 | (simple_symbol) @name |
|
183 | 183 |
|
184 | 184 | ; Nested test methods |
185 | 185 | (call |
186 | | - method: (identifier) @ctx (#any-of? @ctx "describe" "context" "shared_examples") |
| 186 | + method: (identifier) @_ctx (#any-of? @_ctx "describe" "context" "shared_examples") |
187 | 187 | arguments: (argument_list . [ |
188 | 188 | (string) |
189 | 189 | (simple_symbol) |
|
194 | 194 | block: (_ |
195 | 195 | (_ |
196 | 196 | (call |
197 | | - method: (identifier) @run @name (#any-of? @run "describe" "context" "test" "it" "shared_examples") |
| 197 | + method: (identifier) @_run @name (#any-of? @_run "describe" "context" "test" "it" "shared_examples") |
198 | 198 | arguments: (argument_list . [ |
199 | 199 | (string) @name |
200 | 200 | (simple_symbol) @name |
|
215 | 215 |
|
216 | 216 | ; RSpec one-liners |
217 | 217 | (call |
218 | | - method: (identifier) @ctx (#any-of? @ctx "describe" "context" "shared_examples") |
| 218 | + method: (identifier) @_ctx (#any-of? @_ctx "describe" "context" "shared_examples") |
219 | 219 | arguments: (argument_list . [ |
220 | 220 | (string) |
221 | 221 | (simple_symbol) |
|
226 | 226 | block: (_ |
227 | 227 | (_ |
228 | 228 | (call |
229 | | - method: (identifier) @run @name (#any-of? @run "it") |
| 229 | + method: (identifier) @_run @name (#any-of? @_run "it") |
230 | 230 | block: (block |
231 | 231 | body: (block_body |
232 | 232 | (call |
233 | | - receiver: (identifier) @expectation (#any-of? @expectation "is_expected") |
234 | | - method: (identifier) @negation (#any-of? @negation "to" "not_to" "to_not") |
| 233 | + receiver: (identifier) @_expectation (#any-of? @_expectation "is_expected") |
| 234 | + method: (identifier) @_negation (#any-of? @_negation "to" "not_to" "to_not") |
235 | 235 | ) |
236 | 236 | ) |
237 | 237 | ) @name |
|
243 | 243 | ; Root rake namespace |
244 | 244 | (program |
245 | 245 | (call |
246 | | - method: (identifier) @namespace @name (#any-of? @namespace "namespace") |
| 246 | + method: (identifier) @_namespace @name (#any-of? @_namespace "namespace") |
247 | 247 | arguments: (argument_list . [ |
248 | 248 | (string) @name |
249 | 249 | (simple_symbol) @name |
|
254 | 254 |
|
255 | 255 | ; Nested rake namespace |
256 | 256 | (call |
257 | | - method: (identifier) @parent_namespace (#any-of? @parent_namespace "namespace") |
| 257 | + method: (identifier) @_parent_namespace (#any-of? @_parent_namespace "namespace") |
258 | 258 | arguments: (argument_list . [ |
259 | 259 | (string) |
260 | 260 | (simple_symbol) |
|
263 | 263 | block: (_ |
264 | 264 | (_ |
265 | 265 | (call |
266 | | - method: (identifier) @namespace @name (#any-of? @namespace "namespace") |
| 266 | + method: (identifier) @_namespace @name (#any-of? @_namespace "namespace") |
267 | 267 | arguments: (argument_list . [ |
268 | 268 | (string) @name |
269 | 269 | (simple_symbol) @name |
|
277 | 277 | ; Root rake task |
278 | 278 | (program |
279 | 279 | (call |
280 | | - method: (identifier) @task @name (#any-of? @task "task") |
| 280 | + method: (identifier) @_task @name (#any-of? @_task "task") |
281 | 281 | arguments: (argument_list . [ |
282 | 282 | (string) @name |
283 | 283 | (simple_symbol) @name |
|
291 | 291 |
|
292 | 292 | ; Nested rake task |
293 | 293 | (call |
294 | | - method: (identifier) @namespace (#any-of? @namespace "namespace") |
| 294 | + method: (identifier) @_namespace (#any-of? @_namespace "namespace") |
295 | 295 | arguments: (argument_list . [ |
296 | 296 | (string) |
297 | 297 | (simple_symbol) |
|
300 | 300 | block: (_ |
301 | 301 | (_ |
302 | 302 | (call |
303 | | - method: (identifier) @task @name (#any-of? @task "task") |
| 303 | + method: (identifier) @_task @name (#any-of? @_task "task") |
304 | 304 | arguments: (argument_list . [ |
305 | 305 | (string) @name |
306 | 306 | (simple_symbol) @name |
|
0 commit comments