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

Conversation

anoadragon453
Copy link
Member

  • flake8 currently takes the longest to execute, so move it to the end
  • prevent linting from stopped on non-0 exit code. this would require the script to be re-run to get through all of the tools

# black - opinionated code formatter

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.

@clokep
Copy link
Member

clokep commented Jun 24, 2020

Will this fix the terrible-ness of trailing commas passing flake8, being formatted with black, then failing flake8 on the next run?

@anoadragon453
Copy link
Member Author

Will this fix the terrible-ness of trailing commas passing flake8, being formatted with black, then failing flake8 on the next run?

Well, now you will only need to run the script once instead of twice to hit that failure mode, so yay?

@clokep
Copy link
Member

clokep commented Jun 24, 2020

Will this fix the terrible-ness of trailing commas passing flake8, being formatted with black, then failing flake8 on the next run?

Well, now you will only need to run the script once instead of twice to hit that failure mode, so yay?

That's enough to keep me from pushing and waiting for it to fail in CI!

@anoadragon453 anoadragon453 merged commit 177b2d0 into develop Jun 25, 2020
@anoadragon453 anoadragon453 deleted the anoa/reorder_linting_tools branch June 25, 2020 16:58
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit 'dc80a0762':
  1.16.0rc1
  Back out MSC2625 implementation (#7761)
  Additional configuration options for auto-join rooms (#7763)
  Add some metrics for inbound and outbound federation processing times (#7755)
  Explain the purpose of the "tests" conditional dependency requirement (#7751)
  Add another yield point to state res v2 (#7746)
  Move flake8 to end. Don't exit script on failure (#7738)
  Make tox actions work on Debian 10 (#7703)
  Yield during large v2 state res. (#7735)
  add org.matrix.login.jwt so that m.login.jwt can be deprecated (#7675)
  Set Content-Length for Metrics requests (#7730)
  Sync ignored table names in synapse_port_db to current database schema (#7717)
  Allow local media to be marked as safe from being quarantined. (#7718)
  Convert directory handler to async/await (#7727)
  Speed up state res v2 across large state differences. (#7725)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants