File tree Expand file tree Collapse file tree
front/php/templates/language Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments