linter to survive flake8 crash

Summary: Internally flake8 sometimes crashes. Stop the rest of the linter being bypassed when this happens.

Reviewed By: theschnitz

Differential Revision: D27765255

fbshipit-source-id: 7ad1fb4630a05f4bc3763cf13370f5e4e00228de
This commit is contained in:
Jeremy Reizenstein 2021-04-14 12:48:51 -07:00 committed by Facebook GitHub Bot
parent 4a9e294436
commit 42016bc067

View File

@ -22,14 +22,14 @@ echo "Running black..."
black "${DIR}"
echo "Running flake..."
flake8 "${DIR}"
flake8 "${DIR}" || true
echo "Running clang-format ..."
clangformat=$(command -v clang-format-8 || echo clang-format)
find "${DIR}" -regex ".*\.\(cpp\|c\|cc\|cu\|cuh\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 "${clangformat}" -i
# Run arc and pyre internally only.
if [[ -f tests/TARGETS ]]
if [[ -f "${DIR}/tests/TARGETS" ]]
then
(cd "${DIR}"; command -v arc > /dev/null && arc lint) || true