From 82f6628a581b0e38f661f5f3954a8b6e6e6df30f Mon Sep 17 00:00:00 2001 From: Anthony Fiddes <11233666+Anthony-Fiddes@users.noreply.github.com> Date: Sat, 5 Apr 2025 19:57:07 +0200 Subject: [PATCH] feat(yaml): add bash injection for taskfiles --- queries/yaml/injections.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/queries/yaml/injections.scm b/queries/yaml/injections.scm index b05c332fe..d0a3c930f 100644 --- a/queries/yaml/injections.scm +++ b/queries/yaml/injections.scm @@ -2,9 +2,10 @@ (#set! injection.language "comment")) ; Github actions ("run") / Gitlab CI ("scripts") +; Taskfile scripts ("cmds", "sh") (block_mapping_pair key: (flow_node) @_run - (#any-of? @_run "run" "script" "before_script" "after_script") + (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh") value: (flow_node (plain_scalar (string_scalar) @injection.content) @@ -12,7 +13,7 @@ (block_mapping_pair key: (flow_node) @_run - (#any-of? @_run "run" "script" "before_script" "after_script") + (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh") value: (block_node (block_scalar) @injection.content (#set! injection.language "bash") @@ -20,7 +21,7 @@ (block_mapping_pair key: (flow_node) @_run - (#any-of? @_run "run" "script" "before_script" "after_script") + (#any-of? @_run "run" "script" "before_script" "after_script" "cmds" "sh") value: (block_node (block_sequence (block_sequence_item @@ -31,7 +32,7 @@ (block_mapping_pair key: (flow_node) @_run - (#any-of? @_run "script" "before_script" "after_script") + (#any-of? @_run "script" "before_script" "after_script" "cmds" "sh") value: (block_node (block_sequence (block_sequence_item