-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -u | ||
|
||
eval "$(./conda/bin/conda shell.bash hook)" | ||
conda activate ./env | ||
|
||
# We want to run all the style checks even if one of them fail. | ||
|
||
exit_status=0 | ||
|
||
printf "\x1b[34mRunning flake8: " | ||
flake8 --version | ||
printf "\x1b[0m\n" | ||
flake8 torchtext test build_tools/setup_helpers | ||
status=$? | ||
exit_status="$((exit_status+status))" | ||
if [ "${status}" -ne 0 ]; then | ||
printf "\x1b[31mflake8 failed. Check the format of Python files.\x1b[0m\n" | ||
fi | ||
|
||
printf "\x1b[34mRunning clang-format: " | ||
clang-format --version | ||
printf "\x1b[0m\n" | ||
git-clang-format origin/master | ||
git diff --exit-code | ||
status=$? | ||
exit_status="$((exit_status+status))" | ||
if [ "${status}" -ne 0 ]; then | ||
printf "\x1b[31mC++ files are not formatted. Please use git-clang-format to format CPP files.\x1b[0m\n" | ||
fi | ||
exit $exit_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.