diff --git a/.github/workflow-scripts/analyze_code.sh b/.github/workflow-scripts/analyze_code.sh index ebb6a1d72ee..1dd5bcbf28f 100755 --- a/.github/workflow-scripts/analyze_code.sh +++ b/.github/workflow-scripts/analyze_code.sh @@ -4,12 +4,19 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -GITHUB_OWNER=-facebook -GITHUB_REPO=-react-native -export GITHUB_OWNER -export GITHUB_REPO +export GITHUB_OWNER=-facebook +export GITHUB_REPO=-react-native -cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check --silent --json; echo google-java-format; node scripts/lint-java.js --diff) | node packages/react-native-bots/code-analysis-bot.js +{ + echo eslint + npm run lint --silent -- --format=json + + echo flow + npm run flow-check --silent --json + + echo google-java-format + node scripts/lint-java.js --diff +} | node packages/react-native-bots/code-analysis-bot.js STATUS=$? if [ $STATUS == 0 ]; then @@ -17,3 +24,4 @@ if [ $STATUS == 0 ]; then else echo "Code analysis failed, error status $STATUS." fi +exit $STATUS