react-native/scripts/circleci/analyze_code.sh
Héctor Ramos 1fe7b40a33 Fix eslint code analysis bot (#20822)
Summary:
The eslint bot has not been working since the migration to Circle 2.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/20822

Differential Revision: D9492680

Pulled By: hramos

fbshipit-source-id: 7f2f9ac125b6cab1750902c485a6d27d6c3cf302
2018-08-23 20:34:51 -07:00

12 lines
315 B
Bash
Executable File

#!/bin/bash
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | node scripts/circleci/code-analysis-bot.js
# check status
STATUS=$?
if [ $STATUS == 0 ]; then
echo "Code analyzed successfully"
else
echo "Code analysis failed, error status $STATUS"
fi