2018-03-16 23:48:36 +00:00
|
|
|
#!/bin/bash
|
2018-09-11 22:27:47 +00:00
|
|
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
2018-09-07 20:08:05 +00:00
|
|
|
#
|
|
|
|
# This source code is licensed under the MIT license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
2018-03-16 23:48:36 +00:00
|
|
|
|
2018-08-24 03:23:32 +00:00
|
|
|
cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | node scripts/circleci/code-analysis-bot.js
|
2018-03-16 23:48:36 +00:00
|
|
|
|
|
|
|
# check status
|
|
|
|
STATUS=$?
|
|
|
|
if [ $STATUS == 0 ]; then
|
|
|
|
echo "Code analyzed successfully"
|
|
|
|
else
|
2018-08-24 03:23:32 +00:00
|
|
|
echo "Code analysis failed, error status $STATUS"
|
2018-03-16 23:48:36 +00:00
|
|
|
fi
|