https://github.com/mfn/detect_short_open_tag
Scans the given directories / files and reports uses of short open tags
https://github.com/mfn/detect_short_open_tag
Last synced: 2 months ago
JSON representation
Scans the given directories / files and reports uses of short open tags
- Host: GitHub
- URL: https://github.com/mfn/detect_short_open_tag
- Owner: mfn
- License: mit
- Created: 2020-07-07T07:34:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-07T14:29:51.000Z (almost 5 years ago)
- Last Synced: 2025-01-23T22:25:47.072Z (4 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Detect the use of short_open_tag in your PHP source code
## Installation
`composer require --dev mfn/detect_short_open_tag`
## Usage
```
bin/detect_short_open_tag [-e|--extension php] ...
Scans the given paths for PHP files containing the use of short open tags and reports them.
-e|--extension File extensions to scan, defaults to 'php'
One or more directories to scan fo
The script will exit with 0 if no short open tags where found and 1 otherwise.
```Example output (compatible with Github Actions):
```
::error file=tests/mixed_open_tags.php,line=2::short open tag not allowed
::error file=tests/mixed_open_tags.php,line=4::short open tag not allowed
::error file=tests/only_short_open_tag.php,line=1::short open tag not allowed
::error file=tests/short_open_tag_other_file_extension.foo,line=1::short open tag not allowed
```