Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
<? Schreibweise unterbinden
  • Loading branch information
SvenoF54 authored Jan 17, 2025
1 parent fb576ef commit f50b661
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check PHP Short Tags

on:
push:
paths:
- '**/*.php'
pull_request:
paths:
- '**/*.php'

jobs:
check-php-short-tags:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Search for disallowed PHP short tags
run: |
DISALLOWED_PATTERN='<\?(?!php|=)'
if grep -rE "$DISALLOWED_PATTERN" .; then
echo "Error: Disallowed PHP short tags '<?' found!"
exit 1
fi

0 comments on commit f50b661

Please sign in to comment.