on master help sign in
queries/nix: add injection rule for python test scripts
commitb4494e1dc54f342d8c765b793bf934ae730b5253 authorpacien <pacien.trangirard@pacien.net> dateFri 3 Feb 2023, 23:09 (4 years ago) parent0e55648
1 file changed+10
runtime/queries/nix/injections.scm+10
runtime/queries/nix/injections.scm+10
@@ -6,6 +6,16 @@
66 (indented_string_expression (string_fragment) @injection.content))
77 (#set! injection.combined))
88
9+; Common attribute keys corresponding to Python scripts,
10+; such as those for NixOS VM tests in nixpkgs/nixos/tests.
11+((binding
12+ attrpath: (attrpath (identifier) @_path)
13+ expression: (indented_string_expression
14+ (string_fragment) @injection.content))
15+ (#match? @_path "(^|\\.)testScript$")
16+ (#set! injection.language "python")
17+ (#set! injection.combined))
18+
919; Common attribute keys corresponding to scripts,
1020; such as those of stdenv.mkDerivation.
1121((binding