Skip to content

Commit c222a45

Browse files
ankursharmascopybara-github
authored andcommitted
chore: Making the regex to catch cli reference strict by adding word boundary anchor
Right now the regex is over-matching and is returning true for references like these: from ..utils._client_labels_utils import EVAL_CLIENT_LABEL Co-authored-by: Ankur Sharma <ankusharma@google.com> PiperOrigin-RevId: 857255767
1 parent ea0934b commit c222a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/check-file-contents.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
echo ""
9797
9898
set +e
99-
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*cli.*import.*$' $CHANGED_FILES)
99+
FILES_WITH_FORBIDDEN_IMPORT=$(grep -lE '^from.*\bcli\b.*import.*$' $CHANGED_FILES)
100100
GREP_EXIT_CODE=$?
101101
set -e
102102

0 commit comments

Comments
 (0)