diff --git a/CHANGELOG.md b/CHANGELOG.md index 35f5562..c9ec7a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ All notable changes to this project will be documented in this file. ### Fixed +- Fixed bash `local: can only be used in a function` errors that appeared on every scan invocation. The simple-pattern runner loop uses `local` in top-level scope; replaced with plain variable assignments + - N+1 pattern findings now include the actual source code line in the report. Previously the `code` field was empty because `find_meta_in_loop_line` only returned the line number without extracting the source text ### Tests diff --git a/dist/bin/check-performance.sh b/dist/bin/check-performance.sh index 81a9f78..3c9b1c2 100755 --- a/dist/bin/check-performance.sh +++ b/dist/bin/check-performance.sh @@ -6054,10 +6054,10 @@ if [ -n "$SIMPLE_PATTERNS" ]; then include_args="--include=*.php" fi - local exclude_file_globs="" - local exclude_line_patterns="" - local exclude_file_contains="" - local current_exclusion_block="" + exclude_file_globs="" + exclude_line_patterns="" + exclude_file_contains="" + current_exclusion_block="" while IFS= read -r json_line; do case "$json_line" in