diff --git a/.gitea/workflows/syntax-check.yaml b/.gitea/workflows/syntax-check.yaml index e79df4f..a9b891d 100644 --- a/.gitea/workflows/syntax-check.yaml +++ b/.gitea/workflows/syntax-check.yaml @@ -1,4 +1,4 @@ -name: Syntax Check (Every 2 Commits) +name: Syntax Check on: push: @@ -8,16 +8,13 @@ on: jobs: syntax-check: runs-on: archlinux - if: ${{ github.event.commits && github.event.commits.length >= 2 }} steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install linting tools run: | - sudo apt-get update - sudo apt-get install -y shellcheck - pip install --break-system-packages yamllint + pacman -Syu --noconfirm --needed shellcheck python-yamllint - name: Lint shell scripts with ShellCheck run: | @@ -111,7 +108,7 @@ jobs: # Skip empty lines and comments [[ -z "$line" || "$line" =~ ^# ]] && continue - # Check for invalid characters (package names should be alphanumeric, hyphens, dots, underscores, @) + # Check for invalid characters if [[ ! "$line" =~ ^[a-zA-Z0-9._@+\-]+$ ]]; then echo "❌ Line $LINENUM: invalid package name format: '$line'" FAILED=1