mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 04:34:27 +00:00
Exclude website files from long lines check
This commit is contained in:
@@ -74,7 +74,7 @@ if [[ ! -z "${trailing_whitespace}" ]]; then
|
||||
fi
|
||||
|
||||
# Prohibit long lines in php files.
|
||||
long_lines=$(find .. -type "f" -iname "*.php" ! -path "*/vendor/*" -exec awk '{print FILENAME":"NR" "length}' {} \; | awk '$2 > 120')
|
||||
long_lines=$(find .. -type "f" -iname "*.php" ! -path "*/vendor/*" ! -path "*/www/*" -exec awk '{print FILENAME":"NR" "length}' {} \; | awk '$2 > 120')
|
||||
if [[ ! -z "${long_lines}" ]]; then
|
||||
result="$(echo -e "${long_lines}" | perl -pe 's/^(.*)$/Long lines found in \1/')"
|
||||
echo "${result}"
|
||||
|
||||
Reference in New Issue
Block a user