Skip to content

Merge pull request #1732 from sbadakhc/issue-1730/release-v1-1-50 #193

Merge pull request #1732 from sbadakhc/issue-1730/release-v1-1-50

Merge pull request #1732 from sbadakhc/issue-1730/release-v1-1-50 #193

Workflow file for this run

name: Check Environment
permissions:
contents: read
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-env:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.0
- name: Make aixcl executable
run: chmod +x ./aixcl
- name: Run aixcl check-env
run: ./aixcl utils check-env
check-line-endings:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.0
- name: Check for Windows line endings (CRLF)
run: |
echo "Checking for CRLF line endings..."
CRLF_FILES=$(find . -type f \
-not -path "./.git/*" \
-not -path "./pgadmin-data/*" \
-not -path "./logs/*" \
-exec file {} \; 2>/dev/null \
| grep -i "with CRLF" | cut -d: -f1 | sed 's|^\./||')
if [ -n "$CRLF_FILES" ]; then
echo "❌ Found files with Windows line endings (CRLF):"
echo "$CRLF_FILES"
echo ""
echo "Please convert these files to Unix line endings (LF) before committing."
echo "You can use: sed -i 's/\\r$//' <file>"
exit 1
else
echo "✅ No CRLF files found - all line endings are Unix style (LF)"
fi
check-ascii-markdown:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.0
- name: Check for non-ASCII Unicode punctuation in markdown files
run: |
echo "Checking markdown files for non-ASCII Unicode punctuation..."
BAD_FILES=$(grep -rlP "[\x{2013}\x{2014}\x{2018}\x{2019}\x{201C}\x{201D}\x{2026}\x{00A0}]" \
--include="*.md" \
--exclude-dir=node_modules \
--exclude-dir=.git \
. 2>/dev/null || true)
if [ -n "$BAD_FILES" ]; then
echo "❌ Found markdown files containing non-ASCII Unicode punctuation:"
echo "$BAD_FILES"
echo ""
echo "Prohibited characters: em dash (--), en dash (-), smart quotes, ellipsis, non-breaking space"
echo "Replace with ASCII equivalents: -- for em/en dash, ... for ellipsis, plain quotes"
exit 1
else
echo "✅ All markdown files use ASCII-only punctuation"
fi
check-ai-elisions:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v7.0.0
with:
fetch-depth: 0
- name: Check diff for AI-elision damage
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE="${{ github.event.pull_request.base.sha }}"
HEAD="${{ github.event.pull_request.head.sha }}"
else
BASE="$(git rev-parse HEAD~1 2>/dev/null || true)"
HEAD="$(git rev-parse HEAD)"
fi
if [ -z "$BASE" ]; then
echo "No parent commit to compare against; skipping."
exit 0
fi
bash scripts/checks/check-ai-elisions.sh --range "$BASE" "$HEAD"