Skip to content

Commit

Permalink
queries/nix: add injection rule for python test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pacien authored and the-mikedavis committed Sep 16, 2023
1 parent 0e55648 commit b4494e1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/queries/nix/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
(indented_string_expression (string_fragment) @injection.content))
(#set! injection.combined))

; Common attribute keys corresponding to Python scripts,
; such as those for NixOS VM tests in nixpkgs/nixos/tests.
((binding
attrpath: (attrpath (identifier) @_path)
expression: (indented_string_expression
(string_fragment) @injection.content))
(#match? @_path "(^|\\.)testScript$")
(#set! injection.language "python")
(#set! injection.combined))

; Common attribute keys corresponding to scripts,
; such as those of stdenv.mkDerivation.
((binding
Expand Down

0 comments on commit b4494e1

Please sign in to comment.