Skip to content

Commit

Permalink
Fixed ezrobot so that stderr is also sent to REPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
vidarl committed Mar 17, 2017
1 parent 1cb3b66 commit 8b7eb02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/pull-request-cs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ "$TOOL" = "phpcs" ] ; then
echo '```' >> "$REPORT"
fi
elif [ "$TOOL" = "phpcsfixer" ] ; then
~/.composer/vendor/bin/php-cs-fixer --dry-run --diff -v fix --no-ansi $* > "$REPORT"
~/.composer/vendor/bin/php-cs-fixer --dry-run --diff -v fix --no-ansi $* > "$REPORT" 2>&1
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ] ; then
sed -i '1s@^@Tool version : '"`~/.composer/vendor/bin/php-cs-fixer --version 2>&1`"'\nCommand executed ```'"php-cs-fixer --dry-run --diff -v fix $*"'```\nThis Pull Request does not respect [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/), please, see the suggested diff below:\n\n```diff\n@' "$REPORT"
Expand All @@ -61,14 +61,14 @@ elif [ "$TOOL" = "jshint" ] ; then
fi
elif [ "$TOOL" = "csslint" ] ; then
[ ! -f "$CSSLINTRC" ] && wget "$REMOTE_CSSLINTRC" -O "$CSSLINTRC"
csslint $* | grep --color=never 'Error' > "$REPORT"
csslint $* | grep --color=never 'Error' > "$REPORT" 2>&1
EXIT_CODE=`wc -l $REPORT | cut -d ' ' -f 1`
if [ $EXIT_CODE -ne 0 ] ; then
sed -i '1s@^@Tool version : csslint '"`csslint --version 2>&1`"'\nCommand executed ```'"csslint $*"' | grep --color=never "Error"```\ncsslint with [our configuration](https://github.com/ezsystems/ezcs/tree/master/css) reports the following errors:\n\n```\n@' "$REPORT"
echo '```' >> "$REPORT"
fi
elif [ "$TOOL" = "yuidoc" ] ; then
yuidoc --lint $* >> $REPORT
yuidoc --lint $* > $REPORT 2>&1
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ] ; then
sed -i '1s@^@Tool version : yuidoc '"`yuidoc --version 2>&1`"'\nCommand executed ```'"yuidoc --lint $*"'```\nyuidoc reports the following documentation warnings:\n\n```\n@' "$REPORT"
Expand Down

0 comments on commit 8b7eb02

Please sign in to comment.