Skip to content

Commit c11c4f6

Browse files
ZviBaratzclaude
andcommitted
feat: add --exclude flag to field test runner
Repeatable flag to skip specific extensions from both lint and review phases. Useful for skipping already-reviewed extensions in a full run. Usage: --exclude hara-hachi-bu --exclude gsconnect Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 86e22ae commit c11c4f6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/field-test-runner.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# --lint-only Only run ego-lint (default)
77
# --update-baselines Save current results as new baselines
88
# --extension NAME Run for a single extension
9+
# --exclude NAME Exclude extension (repeatable)
910
# --fetch-only Only fetch/update extension sources
1011
# --no-fetch Skip fetching, use existing cache/paths
1112
# --json Output summary as JSON instead of table
@@ -35,6 +36,7 @@ PLUGIN_DIR="$ROOT_DIR"
3536
# Options
3637
OPT_UPDATE_BASELINES=false
3738
OPT_SINGLE_EXT=""
39+
OPT_EXCLUDE_EXTS=()
3840
OPT_FETCH_ONLY=false
3941
OPT_NO_FETCH=false
4042
OPT_JSON=false
@@ -47,6 +49,7 @@ while [[ $# -gt 0 ]]; do
4749
case "$1" in
4850
--update-baselines) OPT_UPDATE_BASELINES=true; shift ;;
4951
--extension) OPT_SINGLE_EXT="$2"; shift 2 ;;
52+
--exclude) OPT_EXCLUDE_EXTS+=("$2"); shift 2 ;;
5053
--fetch-only) OPT_FETCH_ONLY=true; shift ;;
5154
--no-fetch) OPT_NO_FETCH=true; shift ;;
5255
--json) OPT_JSON=true; shift ;;
@@ -60,6 +63,7 @@ while [[ $# -gt 0 ]]; do
6063
echo " --lint-only Only run ego-lint (default)"
6164
echo " --update-baselines Save current results as new baselines"
6265
echo " --extension NAME Run for a single extension"
66+
echo " --exclude NAME Exclude extension (repeatable)"
6367
echo " --fetch-only Only fetch/update extension sources"
6468
echo " --no-fetch Skip fetching, use existing cache/paths"
6569
echo " --json Output summary as JSON instead of table"
@@ -212,10 +216,15 @@ print(json.dumps(exts[$idx]))
212216
uuid="$(echo "$ext_json" | python3 -c "import json,sys; print(json.load(sys.stdin)['uuid'])")"
213217
ego_approved="$(echo "$ext_json" | python3 -c "import json,sys; print('true' if json.load(sys.stdin).get('ego_approved', False) else 'false')")"
214218

215-
# Filter by --extension if specified
219+
# Filter by --extension / --exclude if specified
216220
if [[ -n "$OPT_SINGLE_EXT" && "$name" != "$OPT_SINGLE_EXT" ]]; then
217221
return 2 # signal: silently filtered out
218222
fi
223+
for excl in "${OPT_EXCLUDE_EXTS[@]+"${OPT_EXCLUDE_EXTS[@]}"}"; do
224+
if [[ "$name" == "$excl" ]]; then
225+
return 2
226+
fi
227+
done
219228

220229
echo "--- $name ($uuid) ---"
221230

0 commit comments

Comments
 (0)