mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
github wf
This commit is contained in:
14
.github/workflows/code_checks.yml
vendored
14
.github/workflows/code_checks.yml
vendored
@@ -17,15 +17,21 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check for absolute path URLs
|
- name: Check for invalid relative 'php/' URLs in frontend code
|
||||||
run: |
|
run: |
|
||||||
if grep -rE "['\"]\/php\/" --include=\*.{js,php} .; then
|
echo "🔍 Checking for relative 'php/' URLs that should be './php/' or '/php/'..."
|
||||||
echo "❌ Found absolute path URLs starting with '/php/'. Please use relative paths."
|
|
||||||
|
MATCHES=$(grep -rE "['\"]php\/" --include=\*.{js,php,html} . | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true
|
||||||
|
|
||||||
|
if [ -n "$MATCHES" ]; then
|
||||||
|
echo "$MATCHES"
|
||||||
|
echo "❌ Found improperly relative 'php/' URLs. Use './php/' or '/php/' or a base path."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "✅ No absolute path URLs found."
|
echo "✅ No bad relative 'php/' URLs found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
- name: Check Python syntax
|
- name: Check Python syntax
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
0
front/php/templates/language/zh_cn.json
Normal file → Executable file
0
front/php/templates/language/zh_cn.json
Normal file → Executable file
Reference in New Issue
Block a user