Skip to content

Commit 7f72f87

Browse files
committed
Just: fix just rust format and similar
1 parent aa09288 commit 7f72f87

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

misc/just/lib.just

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ _ql_format +ARGS: (_maybe_build "nolang")
5252

5353
[no-cd, no-exit-message]
5454
_bazel COMMAND *ARGS:
55-
{{ cmd_sep }}{{ if SEMMLE_CODE != "" { '"$SEMMLE_CODE/tools/bazel"' } else { 'bazel' } }} {{ COMMAND }} {{ ARGS }}{{ cmd_sep }}
55+
{{ cmd_sep }}{{ if SEMMLE_CODE != "" { 'cd "$SEMMLE_CODE"; tools/bazel' } else { 'bazel' } }} {{ COMMAND }} {{ ARGS }}{{ cmd_sep }}
5656

5757
[no-cd, no-exit-message]
5858
_sembuild *ARGS: (_run_in_semmle_code "./build" ARGS)
@@ -65,9 +65,11 @@ _run +ARGS:
6565
{{ cmd_sep }}{{ ARGS }}{{ cmd_sep }}
6666

6767
[no-cd]
68-
_run_in_semmle_code +ARGS: _require_semmle_code
69-
{{ cmd_sep }}cd "$SEMMLE_CODE"; {{ ARGS }}{{ cmd_sep }}
68+
_run_in DIR +ARGS:
69+
{{ cmd_sep }}cd "{{ DIR }}"; {{ ARGS }}{{ cmd_sep }}
7070

71+
[no-cd]
72+
_run_in_semmle_code +ARGS: _require_semmle_code (_run_in "$SEMMLE_CODE" ARGS)
7173

7274
[no-cd, positional-arguments, no-exit-message]
7375
_just +ARGS:

rust/justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ build: (_build "rust")
66

77
generate: (_bazel "run" "@codeql//rust/codegen")
88

9-
lint: (_run "python3" "lint.py")
9+
lint: (_run_in source_dir() "python3" "lint.py")
1010

11-
format: (_run "python3" "lint.py" "--format-only")
11+
format: (_run_in source_dir() "python3" "lint.py" "--format-only")
1212

1313
[group('test')]
1414
language-tests *EXTRA_ARGS: (_language_tests EXTRA_ARGS source_dir() 'ql/test')

0 commit comments

Comments
 (0)