Skip to content

Commit 7bb21ea

Browse files
committed
fix: Refine stub detection to avoid false positives on gRPC code
The previous check flagged any comment containing "stub", including legitimate gRPC documentation like "# Create stub". Updated the regex to only flag problematic patterns like: - "stub implementation" - "stub placeholder" - "needs stub" - "stub incomplete" - "stub replace" This preserves detection of incomplete work while allowing standard gRPC terminology.
1 parent 1e0e38c commit 7bb21ea

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/validate-resources.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ jobs:
159159
echo "⚠️ $script: Contains TODO comments"
160160
((found++))
161161
fi
162-
# Only flag 'stub' in comments, not legitimate code usage (e.g., gRPC stubs)
163-
if grep -qiE '^\s*#.*\bstub\b' "$script"; then
164-
echo "⚠️ $script: Contains 'stub' references in comments"
162+
# Only flag problematic 'stub' patterns (not legitimate gRPC usage like "Create stub")
163+
if grep -qiE '^\s*#.*(stub (implementation|method|function|class|code|placeholder)|placeholder stub|needs?.*stub|stub.*incomplete|stub.*replace)' "$script"; then
164+
echo "⚠️ $script: Contains stub implementation references"
165165
((found++))
166166
fi
167167
if grep -qiE '\bmock\b.*\bimplementation\b' "$script"; then

0 commit comments

Comments
 (0)