From e9730f8eaed88cc742e6db34786b19bb712b5866 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 19 Jun 2026 10:26:22 +0200 Subject: perf: scan single nvchecker entry with -e for single-package checks When --check is given exactly one package, and when --hintfile suggests a version without -v, run `nvchecker -e ` so only that entry is scanned instead of the whole nvchecker.toml. Two+ packages or no args still do one full scan, since nvchecker -e accepts only a single entry. Add T42/T43 (mock nvchecker now logs its args), and update CLAUDE.md and README.md (including the previously undocumented -R/--review and -l highlight). Co-Authored-By: Claude Opus 4.8 --- mkhint | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mkhint') diff --git a/mkhint b/mkhint index 8decc76..bca91bc 100755 --- a/mkhint +++ b/mkhint @@ -509,8 +509,9 @@ build_multiline_value() { suggest_version() { local pkg="$1" - # Refresh nvchecker results (stderr only; keep stdout clean for the echo) - nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + # Refresh nvchecker results (stderr only; keep stdout clean for the echo). + # -e limits the run to this entry instead of scanning the whole config. + nvchecker -c "$NVCHECKER_CONFIG" -e "$pkg" >&2 || true local latest latest=$(nvchecker_latest "$pkg") || { @@ -731,9 +732,14 @@ check_updates() { done fi - # Refresh nvchecker results once for everything + # Refresh nvchecker results. With exactly one explicit target, -e limits + # the run to that entry; otherwise scan the whole config in one pass. echo "Running nvchecker..." - nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + if [[ ${#targets[@]} -eq 1 && $# -gt 0 ]]; then + nvchecker -c "$NVCHECKER_CONFIG" -e "${targets[0]}" >&2 || true + else + nvchecker -c "$NVCHECKER_CONFIG" >&2 || true + fi # Classify each target local outdated_pkgs=() outdated_old=() outdated_new=() outdated_flag=() -- cgit v1.2.3