1#!/bin/bash 2# Copyright (c) Meta Platforms, Inc. and affiliates. 3# 4# This source code is licensed under the MIT license found in the 5# LICENSE file in the root directory of this source tree. 6 7GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook} 8GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native} 9export GITHUB_OWNER 10export GITHUB_REPO 11 12cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check-ios --silent --json; echo flow; npm run flow-check-android --silent --json; echo google-java-format; node scripts/lint-java.js --diff) | GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" node packages/react-native-bots/code-analysis-bot.js 13 14STATUS=$? 15if [ $STATUS == 0 ]; then 16 echo "Code analyzed successfully." 17else 18 echo "Code analysis failed, error status $STATUS." 19fi 20