1- set fallback
2- set allow-duplicate-recipes
3- set allow-duplicate-variables
4- set unstable
5-
6- export PATH_SEP := if os () == " windows" { " ;" } else { " :" }
7- export JUST_EXECUTABLE := just_executable ()
8-
9- error := style (" error" ) + " error" + NORMAL + " : "
10- cmd_sep := " \n #--------------------------------------------------------\n "
11- export CMD_BEGIN := style (" command" ) + cmd_sep
12- export CMD_END := cmd_sep + NORMAL
13- export JUST_ERROR := error
14-
15- tsx := " npx tsx@4.19.0"
16-
17- import ? ' ../../../semmle-code.just' # internal repo just file, if present
18- import ' semmle-code-stub.just'
19-
20-
21- [no-exit-message ]
22- @_ require_semmle_code :
23- {{ if SEMMLE_CODE == " " { '''
24- echo "''' + error + ''' running this recipe requires doing so from an internal repository checkout" >&2
25- exit 1
26- ''' } else { " " } }}
27-
28- _ build_dist LANGUAGE : _require_semmle_code (_maybe_build_dist LANGUAGE)
29-
30- [no-exit-message ]
31- _ maybe_build_dist LANGUAGE :
32- {{ cmd_sep }}{{ if SEMMLE_CODE == " " { ' # using codeql from PATH, if any' } else { ' cd "$SEMMLE_CODE"; tools/bazel run //language-packs:intree-' + LANGUAGE } }}{{ cmd_sep }}
33-
34-
35- default_db_checks := """ \
36- --check-databases \
37- --check-diff-informed \
38- --fail-on-trap-errors \
39- """
1+ import " build.just"
2+ import " format.just"
403
414[no-cd , positional-arguments, no-exit-message ]
425@_ codeql_test LANGUAGE BASE_FLAGS ALL_CHECKS_FLAGS EXTRA_ARGS :
@@ -46,17 +9,7 @@ default_db_checks := """\
469@_ language_tests EXTRA_ARGS SOURCE_DIR + ROOTS : _require_semmle_code
4710 {{ tsx }} " {{ source_dir () }} /language-tests.ts" " $@"
4811
49- [no-cd , no-exit-message ]
50- _ ql_format + ARGS : (_maybe_build_dist " nolang" )
51- {{ cmd_sep }}{{ if SEMMLE_CODE != " " { ' "$SEMMLE_CODE/target/intree/codeql-nolang/codeql"' } else { ' codeql' } }} query format --in-place $(find {{ ARGS }} -type f -name ' *.ql' -or -name ' *.qll' ){{ cmd_sep }}
52-
53-
54- [no-cd , no-exit-message ]
55- _ bazel COMMAND * ARGS :
56- {{ cmd_sep }}{{ if SEMMLE_CODE != " " { ' cd "$SEMMLE_CODE"; tools/bazel' } else { ' bazel' } }} {{ COMMAND }} {{ ARGS }}{{ cmd_sep }}
5712
58- [no-cd , no-exit-message ]
59- _ sembuild * ARGS : (_run_in_semmle_code " ./build" ARGS)
6013
6114[no-cd , no-exit-message ]
6215_ integration_test * ARGS : _require_semmle_code (_run " $SEMMLE_CODE/tools/pytest" ARGS)
@@ -83,6 +36,3 @@ _run_in_semmle_code +ARGS: _require_semmle_code (_run_in "$SEMMLE_CODE" ARGS)
8336 echo " -> just $@" ; \
8437 " $JUST_EXECUTABLE" " $@" ; \
8538 fi
86-
87- [no-cd ]
88- _ black * ARGS = " .": (_run " uv" " run" " black" ARGS)
0 commit comments