Skip to content

Commit 4ba14a5

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 342cf79 commit 4ba14a5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/migration/build-migration-context.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,18 @@ grep -Ff "$tmp_symbols" docs/migration/v1-to-v2.md docs/migration/v1-to-v2-chang
141141
| head -n 200 > "$output_dir/docs-coverage-hits.txt" || true
142142

143143
: > "$output_dir/v1-symbol-candidates.txt"
144+
candidate_lines=0
144145
while IFS= read -r symbol; do
145146
[[ -z "$symbol" ]] && continue
146-
if [[ "$(wc -l < "$output_dir/v1-symbol-candidates.txt")" -ge 300 ]]; then
147+
if [[ "$candidate_lines" -ge 300 ]]; then
147148
break
148149
fi
149150

150151
matches="$(git grep -n --no-color -F -- "$symbol" "$v1_baseline" -- 'Yubico.Core' 'Yubico.YubiKey' 2>/dev/null | head -n 3 || true)"
151152
if [[ -n "$matches" ]]; then
152153
printf '%s\n' "$matches" >> "$output_dir/v1-symbol-candidates.txt"
154+
added_lines="$(printf '%s\n' "$matches" | wc -l | tr -d ' ')"
155+
candidate_lines=$((candidate_lines + added_lines))
153156
fi
154157
done < "$tmp_symbols"
155158

0 commit comments

Comments
 (0)