chore: make file size check a warning instead of failure
This commit is contained in:
parent
3187ff26ea
commit
4813228a0c
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue