Loading build-aux/format-and-check +6 −6 Original line number Original line Diff line number Diff line Loading @@ -12,11 +12,11 @@ function error() { echo "Removing dot-files..." echo "Removing dot-files..." find ATS -name ".*" | xargs rm -rfv find ATS -name ".*" -print0 | xargs -0 rm -rfv echo "Fixing permissions..." echo "Fixing permissions..." find ATS -type f | xargs chmod 664 find ATS -type f -print0 | xargs -0 chmod 664 find ATS -type d | xargs chmod 775 find ATS -type d -print0 | xargs -0 chmod 775 echo "Looking for unknown file types..." echo "Looking for unknown file types..." while IFS= read -r -d $'\0' file; do while IFS= read -r -d $'\0' file; do Loading @@ -24,14 +24,14 @@ while IFS= read -r -d $'\0' file; do done < <(find ATS -type f ! -name "*.xml" -a ! -name "*.xsd" -a ! -name "*.ttcn" -a -name "*.json" -a -name "NOTES") done < <(find ATS -type f ! -name "*.xml" -a ! -name "*.xsd" -a ! -name "*.ttcn" -a -name "*.json" -a -name "NOTES") echo "Converting Windows line endings to Unix..." echo "Converting Windows line endings to Unix..." find ATS -type f -name \*.ttcn | xargs dos2unix 1>/dev/null find ATS -type f -name \*.ttcn -print0 | xargs -0 dos2unix 1>/dev/null echo "Removing trailing whitespace" echo "Removing trailing whitespace" find ATS -type f -name \*.ttcn | xargs sed -i 's/[[:space:]]*$//' find ATS -type f -name \*.ttcn -print0 | xargs -0 sed -i 's/[[:space:]]*$//' echo "Linting TTCN-3 files..." echo "Linting TTCN-3 files..." while IFS= read -r -d $'\0' file; do while IFS= read -r -d $'\0' file; do name=$(basename $file .ttcn) name=$(basename "$file" .ttcn) : Verify that the file path only contains valid characters. : Verify that the file path only contains valid characters. if ! [[ ${file%.ttcn} =~ [A-Za-z0-9_/]+ ]]; then if ! [[ ${file%.ttcn} =~ [A-Za-z0-9_/]+ ]]; then Loading Loading
build-aux/format-and-check +6 −6 Original line number Original line Diff line number Diff line Loading @@ -12,11 +12,11 @@ function error() { echo "Removing dot-files..." echo "Removing dot-files..." find ATS -name ".*" | xargs rm -rfv find ATS -name ".*" -print0 | xargs -0 rm -rfv echo "Fixing permissions..." echo "Fixing permissions..." find ATS -type f | xargs chmod 664 find ATS -type f -print0 | xargs -0 chmod 664 find ATS -type d | xargs chmod 775 find ATS -type d -print0 | xargs -0 chmod 775 echo "Looking for unknown file types..." echo "Looking for unknown file types..." while IFS= read -r -d $'\0' file; do while IFS= read -r -d $'\0' file; do Loading @@ -24,14 +24,14 @@ while IFS= read -r -d $'\0' file; do done < <(find ATS -type f ! -name "*.xml" -a ! -name "*.xsd" -a ! -name "*.ttcn" -a -name "*.json" -a -name "NOTES") done < <(find ATS -type f ! -name "*.xml" -a ! -name "*.xsd" -a ! -name "*.ttcn" -a -name "*.json" -a -name "NOTES") echo "Converting Windows line endings to Unix..." echo "Converting Windows line endings to Unix..." find ATS -type f -name \*.ttcn | xargs dos2unix 1>/dev/null find ATS -type f -name \*.ttcn -print0 | xargs -0 dos2unix 1>/dev/null echo "Removing trailing whitespace" echo "Removing trailing whitespace" find ATS -type f -name \*.ttcn | xargs sed -i 's/[[:space:]]*$//' find ATS -type f -name \*.ttcn -print0 | xargs -0 sed -i 's/[[:space:]]*$//' echo "Linting TTCN-3 files..." echo "Linting TTCN-3 files..." while IFS= read -r -d $'\0' file; do while IFS= read -r -d $'\0' file; do name=$(basename $file .ttcn) name=$(basename "$file" .ttcn) : Verify that the file path only contains valid characters. : Verify that the file path only contains valid characters. if ! [[ ${file%.ttcn} =~ [A-Za-z0-9_/]+ ]]; then if ! [[ ${file%.ttcn} =~ [A-Za-z0-9_/]+ ]]; then Loading