chore: make file size check a warning instead of failure

This commit is contained in:
Jeremie Fraeys 2026-02-17 20:32:50 -05:00
parent 3187ff26ea
commit 4813228a0c
No known key found for this signature in database

View file

@ -38,13 +38,13 @@ else
fi
echo ""
# Check 3: Check file size limits (no file >500 lines)
echo "3. Checking file size limits (max 500 lines)..."
# Check 3: Check file size limits (warn if >500 lines)
echo "3. Checking file size limits (warn if >500 lines)..."
OVERSIZED=$(find ./internal ./cmd -name '*.go' -type f -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {print $2}' | head -10)
if [ -n "$OVERSIZED" ]; then
echo -e "${RED}FAIL: Files exceeding 500 lines:${NC}"
echo -e "${YELLOW}WARNING: Files exceeding 500 lines:${NC}"
find ./internal ./cmd -name '*.go' -type f -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {print " " $1 " lines: " $2}'
FAILED=1
# Not failing the build for this, just warning
else
echo -e "${GREEN}PASS: All files under 500 lines${NC}"
fi