mfn / detect_short_open_tag
扫描给定的目录/文件,并报告短标签的使用情况
1.3
2020-07-07 14:28 UTC
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2024-09-07 23:59:29 UTC
README
安装
composer require --dev mfn/detect_short_open_tag
用法
bin/detect_short_open_tag [-e|--extension php] <dir1>... <dirn>
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'
<dir> One or more directories to scan fo
The script will exit with 0 if no short open tags where found and 1 otherwise.
示例输出(兼容 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