Skip to content

Commit 7fa7634

Browse files
author
jokob-sk
committed
github wf
1 parent b4addd9 commit 7fa7634

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/code_checks.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,21 @@ jobs:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
1919

20-
- name: Check for absolute path URLs
20+
- name: Check for invalid relative 'php/' URLs in frontend code
2121
run: |
22-
if grep -rE "['\"]\/php\/" --include=\*.{js,php} .; then
23-
echo "❌ Found absolute path URLs starting with '/php/'. Please use relative paths."
22+
echo "🔍 Checking for relative 'php/' URLs that should be './php/' or '/php/'..."
23+
24+
MATCHES=$(grep -rE "['\"]php\/" --include=\*.{js,php,html} . | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true
25+
26+
if [ -n "$MATCHES" ]; then
27+
echo "$MATCHES"
28+
echo "❌ Found improperly relative 'php/' URLs. Use './php/' or '/php/' or a base path."
2429
exit 1
2530
else
26-
echo "✅ No absolute path URLs found."
31+
echo "✅ No bad relative 'php/' URLs found."
2732
fi
2833
34+
2935
- name: Check Python syntax
3036
run: |
3137
set -e

front/php/templates/language/zh_cn.json

100644100755
File mode changed.

0 commit comments

Comments
 (0)