Skip to content

Commit 42016bc

Browse files
bottlerfacebook-github-bot
authored andcommitted
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
1 parent 4a9e294 commit 42016bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev/linter.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ echo "Running black..."
2222
black "${DIR}"
2323

2424
echo "Running flake..."
25-
flake8 "${DIR}"
25+
flake8 "${DIR}" || true
2626

2727
echo "Running clang-format ..."
2828
clangformat=$(command -v clang-format-8 || echo clang-format)
2929
find "${DIR}" -regex ".*\.\(cpp\|c\|cc\|cu\|cuh\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 "${clangformat}" -i
3030

3131
# Run arc and pyre internally only.
32-
if [[ -f tests/TARGETS ]]
32+
if [[ -f "${DIR}/tests/TARGETS" ]]
3333
then
3434
(cd "${DIR}"; command -v arc > /dev/null && arc lint) || true
3535

0 commit comments

Comments
 (0)