Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Move flake8 to end. Don't exit script on failure #7738

Merged
merged 3 commits into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7738.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move `flake8` to the end of `scripts-dev/lint.sh` as it takes the longest and could cause the script to exit early.
4 changes: 2 additions & 2 deletions scripts-dev/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# Runs linting scripts over the local Synapse checkout
# isort - sorts import statements
# flake8 - lints and finds mistakes
# black - opinionated code formatter
# flake8 - lints and finds mistakes

set -e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this mean that this script will always return 0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm yes, though I see that it's not actually used in CI.

I believe flake8 was the only one that would return a non-zero exit code, so as it's at the end now it won't block other programs from executing anymore, and we can keep the -e.


Expand All @@ -16,6 +16,6 @@ fi

echo "Linting these locations: $files"
isort -y -rc $files
flake8 $files
python3 -m black $files
./scripts-dev/config-lint.sh
flake8 $files