Skip to content

Commit e07ca9b

Browse files
committed
fix: Further refine stub detection to avoid false positives
Only flag stub comments that clearly indicate incomplete work: - 'stub out', 'stubbed', 'needs stub', 'stub implementation', etc. - Don't flag legitimate gRPC-related comments like '# Create stub' This allows production code to use standard gRPC terminology without triggering validation failures.
1 parent 3730179 commit e07ca9b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/validate-resources.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ jobs:
159159
echo "⚠️ $script: Contains TODO comments"
160160
((found++))
161161
fi
162-
# Only flag "stub" in comments or strings indicating incomplete work
163-
# Don't flag legitimate uses like gRPC stubs (e.g., "self.stub = ...")
164-
if grep -qiE '(#.*\bstub\b|""".*\bstub\b|stub.*implementation|implement.*stub)' "$script"; then
165-
echo "⚠️ $script: Contains 'stub' in comments/strings"
162+
# Only flag "stub" in comments indicating incomplete work
163+
# Don't flag legitimate uses like gRPC stubs or "# Create stub" comments
164+
if grep -qiE '(#.*(stub out|stubbed|needs stub|stub implementation|implement stub|placeholder stub))' "$script"; then
165+
echo "⚠️ $script: Contains 'stub' indicating incomplete work"
166166
((found++))
167167
fi
168168
if grep -qiE '\bmock\b.*\bimplementation\b' "$script"; then

0 commit comments

Comments
 (0)