Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Fixing checks - was failing also with no CS failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Apr 18, 2013
1 parent 4349c8d commit 27512bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bin/check-cs.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash
cd "$(dirname $(dirname "$0"))"

libraryCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./library/)
testsCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./tests/)
libraryCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./library)
testsCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./tests)

output="$libraryCS
$testsCS"

if [[ "$output" ]];
if [[ "$libraryCS" || "$testsCS" ]];
then
echo -en '\E[31m'"$output\033[1m\033[0m";
echo -en '\E[31m'"$libraryCS
$testsCS\033[1m\033[0m";
printf "\n";
echo -en '\E[31;47m'"\033[1mCoding standards check failed!\033[0m" # Red
printf "\n";
Expand All @@ -18,3 +16,5 @@ fi

echo -en '\E[32m'"\033[1mCoding standards check passed!\033[0m" # Green
printf "\n";

echo $libraryCS$testsCS;

0 comments on commit 27512bb

Please sign in to comment.