mirror of
https://github.com/facebook/react-native.git
synced 2026-03-31 09:02:15 +00:00
Summary: While running `yarn spellcheck` I have spotted that scripts located in `/vendor` directory are checked, which lead to a lot of warnings in the output. This PR adds an exclusion for the `/vendor` path in the spellcheck script which leads to way smaller warnings set and saves ~10s of runtime on my machine. ## Changelog: [INTERNAL] [FIXED] - Add `/vendor` to excluded paths for spellcheck script. Pull Request resolved: https://github.com/facebook/react-native/pull/55020 Test Plan: Running `yarn spellcheck` locally. Reviewed By: cipolleschi Differential Revision: D90104078 Pulled By: cortinico fbshipit-source-id: 9c16a71616a13db1c217b917a498ff8f6a462799
27 lines
679 B
Bash
Executable File
27 lines
679 B
Bash
Executable File
#!/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.
|
|
|
|
GITHUB_OWNER=-facebook
|
|
GITHUB_REPO=-react-native
|
|
export GITHUB_OWNER
|
|
export GITHUB_REPO
|
|
|
|
if [ -x "$(command -v shellcheck)" ]; then
|
|
IFS=$'\n'
|
|
|
|
find . \
|
|
-type f \
|
|
-not -path "*node_modules*" \
|
|
-not -path "*third-party*" \
|
|
-not -path "*vendor*" \
|
|
-name '*.sh' \
|
|
-exec sh -c 'shellcheck "$1"' -- {} \;
|
|
|
|
else
|
|
echo 'shellcheck is not installed. See https://github.com/facebook/react-native/wiki/Development-Dependencies#shellcheck for instructions.'
|
|
exit 1
|
|
fi
|