File tree Expand file tree Collapse file tree 15 files changed +38
-29
lines changed
Expand file tree Collapse file tree 15 files changed +38
-29
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ import "../justfile"
22
33base_flags := " --include-location-in-star"
44
5- all_checks := default_db_checks + """ \
5+ all_checks := f """ \
6+ {{ default_db_checks}} \
67 --check-undefined-labels \
78 --check-unused-labels \
8- --consistency-queries=""" + consistency_queries
9+ --consistency-queries={{ consistency_queries }} """
910
1011[no-cd ]
1112test * ARGS = " .": (_codeql_test " cpp" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ import "../justfile"
22
33base_flags := " "
44
5- all_checks := default_db_checks + """ \
5+ all_checks := f """ \
6+ {{ default_db_checks}} \
67 --check-undefined-labels \
78 --check-repeated-labels \
89 --check-redefined-labels \
910 --additional-packs=ql \
10- --consistency-queries=""" + consistency_queries
11+ --consistency-queries={{ consistency_queries }} """
1112
1213[no-cd ]
1314test * ARGS = " .": (_codeql_test " csharp" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -2,13 +2,14 @@ import "../justfile"
22
33base_flags := " "
44
5- all_checks := default_db_checks + """ \
5+ all_checks := f """ \
6+ {{ default_db_checks}} \
67 --check-undefined-labels \
78 --check-unused-labels \
89 --check-repeated-labels \
910 --check-redefined-labels \
1011 --check-use-before-definition \
11- --consistency-queries=""" + consistency_queries
12+ --consistency-queries={{ consistency_queries }} """
1213
1314[no-cd ]
1415test * ARGS = " .": (_codeql_test " go" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ base_flags := """\
44 CODEQL_EXTRACTOR_KOTLIN_DIAGNOSTIC_LIMIT= \
55"""
66
7- all_checks := default_db_checks + """ \
7+ all_checks := f """ \
8+ {{ default_db_checks}} \
89 --check-undefined-labels \
910 --check-repeated-labels \
1011 --check-redefined-labels \
1112 --check-use-before-definition \
12- --consistency-queries=""" + consistency_queries
13+ --consistency-queries={{ consistency_queries }} """
1314
1415[no-cd ]
1516test * ARGS = " .": (_codeql_test " java" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -5,12 +5,13 @@ base_flags := """\
55 CODEQL_KOTLIN_LEGACY_TEST_EXTRACTION_KOTLIN2=true \
66"""
77
8- all_checks := default_db_checks + """ \
8+ all_checks := f """ \
9+ {{ default_db_checks}} \
910 --check-undefined-labels \
1011 --check-repeated-labels \
1112 --check-redefined-labels \
1213 --check-use-before-definition \
13- --consistency-queries=""" + consistency_queries
14+ --consistency-queries={{ consistency_queries }} """
1415
1516[no-cd ]
1617test * ARGS = " .": (_codeql_test " java" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ base_flags := """\
44 CODEQL_EXTRACTOR_KOTLIN_DIAGNOSTIC_LIMIT="\\ " \
55"""
66
7- all_checks := default_db_checks + """ \
7+ all_checks := f """ \
8+ {{ default_db_checks}} \
89 --check-undefined-labels \
910 --check-repeated-labels \
1011 --check-redefined-labels \
1112 --check-use-before-definition \
12- --consistency-queries=""" + consistency_queries
13+ --consistency-queries={{ consistency_queries }} """
1314
1415[no-cd ]
1516test * ARGS = " .": (_codeql_test " java" base_flags all_checks ARGS)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ _build_dist LANGUAGE: _require_semmle_code (_maybe_build_dist LANGUAGE)
88# Build the language-specific distribution if we are in an internal repository checkout
99# Otherwise, do nothing
1010[no-exit-message ]
11- _ maybe_build_dist LANGUAGE : (_if_in_semmle_code (' cd "$SEMMLE_CODE"; tools/bazel test //language-packs:intree-' + LANGUAGE + ' -as-test --test_output=all' ) ' # using codeql from PATH, if any' )
11+ _ maybe_build_dist LANGUAGE : (_if_in_semmle_code (f ' cd "$SEMMLE_CODE"; tools/bazel test //language-packs:intree-{{ LANGUAGE}} -as-test --test_output=all' ) ' # using codeql from PATH, if any' )
1212
1313# Call bazel. Uses our official bazel wrapper if we are in an internal repository checkout
1414[no-cd , no-exit-message ]
Original file line number Diff line number Diff line change @@ -4,12 +4,11 @@ import 'semmle-code-stub.just'
44set fallback
55set allow-duplicate-recipes
66set allow-duplicate-variables
7- set unstable
87
98export PATH_SEP := if os () == " windows" { " ;" } else { " :" }
109export JUST_EXECUTABLE := just_executable ()
1110
12- error := style (" error" ) + " error" + NORMAL + " : "
11+ error := f ' {{ style (" error" )}} error{{ NORMAL }} : '
1312cmd_sep := " \n #--------------------------------------------------------\n "
1413export CMD_BEGIN := style (" command" ) + cmd_sep
1514export CMD_END := cmd_sep + NORMAL
@@ -25,8 +24,8 @@ default_db_checks := """\
2524
2625[no-exit-message ]
2726@_ require_semmle_code :
28- {{ if SEMMLE_CODE == " " { '''
29- echo "''' + error + ''' running this recipe requires doing so from an internal repository checkout" >&2
27+ {{ if SEMMLE_CODE == " " { f '''
28+ echo "{ error} running this recipe requires doing so from an internal repository checkout" >&2
3029 exit 1
3130 ''' } else { " " } }}
3231
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ _format_ql +ARGS: (_maybe_build_dist "nolang") (
55 _if_in_semmle_code
66 ' "$SEMMLE_CODE/target/intree/codeql-nolang/codeql"'
77 ' codeql'
8- (" query format --in-place -v $(find " + ARGS + " -type f -name '*.ql' -or -name '*.qll')" )
8+ (f " query format --in-place -v $(find {{ ARGS}} -type f -name '*.ql' -or -name '*.qll')" )
99)
1010
1111[no-cd , no-exit-message ]
@@ -16,5 +16,5 @@ _format_cpp *ARGS=".": (
1616 _if_in_semmle_code
1717 " uv run clang-format"
1818 " clang-format"
19- " -i --verbose $(find " + ARGS + " -type f -name '*.h' -or -name '*.cpp')"
19+ ( f " -i --verbose $(find {{ ARGS}} -type f -name '*.h' -or -name '*.cpp')")
2020)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import "lib.just"
77# copy&paste necessary for each command until proper forwarding of multiple args is implemented
88# see https://github.com/casey/just/issues/1988
99
10- _forward := py + ' "' + source_dir () + ' /forward_command.py"'
10+ _forward := f ' {{ py }} " {{ source_dir ()}} /forward_command.py"'
1111
1212alias t := test
1313alias b := build
You can’t perform that action at this time.
0 commit comments