Delete unused code-analysis script (#55421)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55421

Deletes the largely unused `analyze_code`/`code-analysis-bot` script, which was part of our earlier CircleCI infra.

**Motivation**

- **Security**: Removes another use of a `GITHUB_TOKEN` env var being loaded into a script in our CI (similar to S603729).
- **Cleanup**: This script attempted to read various lint job results (including google-java-format, which is no longer present), and post a GitHub PR comment for >5 issues. In a GitHub Actions world, we don't really need this functionality.

**Other changes**

- The `yarn shellcheck` run from this script was load bearing, and is moved directly into the `lint` action.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D92407627

fbshipit-source-id: ef5664a273ad4aac721dbb53de73f2b96b47d75b
This commit is contained in:
Alex Hunt authored and meta-codesync[bot] committed 2026-02-05 10:02:20 -08:00
1 parent ab36cdc553
commit 19305299bd
6 files changed
+2 -391

No files matched your search

+2 -8
View File
@@ -5,9 +5,6 @@ inputs:
description: "The node.js version to use"
required: false
default: "22"
github-token:
description: "The GitHub token used by pull-bot"
required: true
runs:
using: composite
steps:
@@ -17,12 +14,9 @@ runs:
node-version: ${{ inputs.node-version }}
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run linters against modified files (analysis-bot)
- name: Run shellcheck
shell: bash
run: yarn lint-ci
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
run: yarn shellcheck
- name: Lint code
shell: bash
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
-24
View File
@@ -1,24 +0,0 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
export GITHUB_OWNER=-facebook
export GITHUB_REPO=-react-native
{
echo eslint
npm run lint --silent -- --format=json
echo flow
npm run flow-check --silent --json
} | node private/react-native-bots/code-analysis-bot.js
STATUS=$?
if [ $STATUS == 0 ]; then
echo "Code analyzed successfully."
else
echo "Code analysis failed, error status $STATUS."
fi
exit $STATUS
-2
View File
@@ -511,8 +511,6 @@ jobs:
uses: actions/checkout@v6
- name: Run all the linters
uses: ./.github/actions/lint
with:
github-token: ${{ env.GH_TOKEN }}
build_debugger_shell:
runs-on: ubuntu-latest