Skip to content
Snippets Groups Projects
Commit 5e2a316c authored by Raul Barreras's avatar Raul Barreras
Browse files

Merge branch 'php-lint-fixes' into 'develop'

Fix a bug linting files with spaces in the name

See merge request !21
parents 69ebc6be 53d6690c
No related branches found
No related tags found
7 merge requests!31Sync 6-add-automated-secrets-detection with Master,!28Sync 6-add-automated-secrets-detection with master,!27Update 7-add-dependency-check to SonarScanner 4.0,!26Sync 7-add-dependency-check with develop,!23Upgrade 10-add-simple-unit-tests-for-containers branch with current develop,!22Resolve "add simple unit tests for containers",!21Fix a bug linting files with spaces in the name
......@@ -51,8 +51,8 @@ for dir in "${LINT_DIRS[@]}"; do
echo "Scanning directory ${dir} for extension ${ext}"
# Scan current dir and ext and lint them
for f in $(find "${dir}" -type f -name "*${ext}"); do
OUTPUT=$(php -l $f 2>&1)
find "${dir}" -type f -name "*${ext}" -print0 | while IFS= read -r -d '' f; do
OUTPUT=$(php -l "$f" 2>&1)
rc=$?
if [[ $rc != 0 ]]; then # Non-zero exit code, print error and exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment