Skip to content

Commit b3fc5f0

Browse files
Fix multi-file analysis by passing comma-separated path argument.
1 parent 65093a2 commit b3fc5f0

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

scripts/lib/analyse.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,23 @@ build_config_args() {
88
fi
99
}
1010

11+
build_analyse_path() {
12+
local path
13+
ANALYSE_PATH=""
14+
15+
for path in ${CHANGED_FILES}; do
16+
if [[ -n "${ANALYSE_PATH}" ]]; then
17+
ANALYSE_PATH+=","
18+
fi
19+
ANALYSE_PATH+="${path}"
20+
done
21+
}
22+
1123
run_analyse() {
1224
local report_type="$1"
1325
local report_file="$2"
1426

15-
# shellcheck disable=SC2086
16-
php "${PHPCCA_BIN}" analyse ${CHANGED_FILES} \
27+
php "${PHPCCA_BIN}" analyse "${ANALYSE_PATH}" \
1728
--report-type="${report_type}" \
1829
--report-file="${report_file}" \
1930
"${CONFIG_ARGS[@]}"
@@ -25,6 +36,7 @@ needs_markdown_report() {
2536

2637
run_all_analyses() {
2738
build_config_args
39+
build_analyse_path
2840

2941
export REPORT_PATH=""
3042
export SARIF_PATH=""

0 commit comments

Comments
 (0)