Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check-file-contents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
echo ""
set +e
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*cli.*import.*$' $CHANGED_FILES)
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from\s+([^ ]*\.)?cli(\s|\.)' $CHANGED_FILES)
GREP_EXIT_CODE=$?
Copy link
Collaborator

@wuliang229 wuliang229 Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things:

  1. Instead of "\s+", just match the space character " "
  2. don't match any pattern before "cli", just match optional "google.adk." or "adk.", i.e. (google.adk.)|(adk.)
  3. add back the matching of "import"

set -e
Expand All @@ -110,4 +110,4 @@ jobs:
fi
else
echo "✅ No relevant Python files found."
fi
fi