diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 3849f60..161e3dc 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -138,10 +138,10 @@ jobs: - name: Check for secrets run: | echo "Checking for potential secrets..." - ! grep -r "MAPBOX_ACCESS_TOKEN" --include="*.js" --include="*.ts" --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git . || \ + ! find . -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v dist | grep -v .git | xargs grep -l "MAPBOX_ACCESS_TOKEN" || \ (echo "❌ Found hardcoded Mapbox token!" && exit 1) - ! grep -r "ADMIN_PASSWORD" --include="*.js" --include="*.ts" --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git . || \ + ! find . -name "*.js" -o -name "*.ts" | grep -v node_modules | grep -v dist | grep -v .git | xargs grep -l "ADMIN_PASSWORD" || \ (echo "❌ Found hardcoded admin password!" && exit 1) echo "✅ No hardcoded secrets found" diff --git a/.forgejo/workflows/code-quality.yml b/.forgejo/workflows/code-quality.yml index f863b6e..0ea4fe3 100644 --- a/.forgejo/workflows/code-quality.yml +++ b/.forgejo/workflows/code-quality.yml @@ -52,10 +52,7 @@ jobs: - name: Check for console.log statements run: | echo "Checking for console.log statements..." - FILES=$(grep -r "console\.log" --include="*.ts" --include="*.js" \ - --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=public/dist \ - --exclude-dir=tests --exclude-dir=scripts \ - src/ || true) + FILES=$(find src/ -name "*.ts" -o -name "*.js" | xargs grep -l "console\.log" || true) if [ -n "$FILES" ]; then echo "⚠️ Found console.log statements (consider using proper logging):" @@ -67,9 +64,7 @@ jobs: - name: Check for TODO/FIXME comments run: | echo "Checking for TODO/FIXME comments..." - TODOS=$(grep -r "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.js" \ - --exclude-dir=node_modules --exclude-dir=dist \ - . || true) + TODOS=$(find . -name "*.ts" -o -name "*.js" | grep -v node_modules | grep -v dist | xargs grep -l "TODO\|FIXME\|HACK\|XXX" || true) if [ -n "$TODOS" ]; then echo "📝 Found TODO/FIXME comments:"