Fix syntax-check: remove commit count gate, use pacman for Arch
Syntax Check / syntax-check (push) Failing after 3s
Syntax Check / syntax-check (push) Failing after 3s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Syntax Check (Every 2 Commits)
|
name: Syntax Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -8,16 +8,13 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
syntax-check:
|
syntax-check:
|
||||||
runs-on: archlinux
|
runs-on: archlinux
|
||||||
if: ${{ github.event.commits && github.event.commits.length >= 2 }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install linting tools
|
- name: Install linting tools
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
pacman -Syu --noconfirm --needed shellcheck python-yamllint
|
||||||
sudo apt-get install -y shellcheck
|
|
||||||
pip install --break-system-packages yamllint
|
|
||||||
|
|
||||||
- name: Lint shell scripts with ShellCheck
|
- name: Lint shell scripts with ShellCheck
|
||||||
run: |
|
run: |
|
||||||
@@ -111,7 +108,7 @@ jobs:
|
|||||||
# Skip empty lines and comments
|
# Skip empty lines and comments
|
||||||
[[ -z "$line" || "$line" =~ ^# ]] && continue
|
[[ -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
|
if [[ ! "$line" =~ ^[a-zA-Z0-9._@+\-]+$ ]]; then
|
||||||
echo "❌ Line $LINENUM: invalid package name format: '$line'"
|
echo "❌ Line $LINENUM: invalid package name format: '$line'"
|
||||||
FAILED=1
|
FAILED=1
|
||||||
|
|||||||
Reference in New Issue
Block a user