yaml(injections): Also add heuristics for Gitlab CI bash

This commit is contained in:
Stephan Seitz 2021-11-27 18:13:22 +01:00
parent ad615ffc4c
commit b5d05aaac8

View file

@ -1,10 +1,19 @@
(comment) @comment
;; Github actions ("run") / Gitlab CI ("scripts")
(block_mapping_pair
key: (flow_node) @_run (#eq? @_run "run")
key: (flow_node) @_run (#any-of? @_run "run" "script")
value: (flow_node
(plain_scalar) @bash))
(block_mapping_pair
key: (flow_node) @_run (#eq? @_run "run")
value: (block_node) @bash (#offset! @bash 0 0 0 0))
key: (flow_node) @_run (#any-of? @_run "run" "script")
value: (block_node
(block_scalar) @bash (#offset! @bash 0 0 0 0)))
(block_mapping_pair
key: (flow_node) @_run (#any-of? @_run "run" "script")
value: (block_node
(block_sequence
(block_sequence_item
(flow_node) @bash))))