Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check formatting as part of CI #25

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Check formatting as part of CI #25

merged 2 commits into from
Feb 6, 2024

Conversation

chriso
Copy link
Contributor

@chriso chriso commented Feb 6, 2024

We now check formatting as part of CI.

If either isort or black find formatting issues they'll print a diff and fail with a non-zero exit code. Care has been taken to ensure that both tools run even if the other has an issue, so that we don't waste time fixing an issue only to find on the next push that the other tool found an issue too.

Here's an example run showing both tools reporting issues: https://github.com/stealthrocket/dispatch-sdk-python/actions/runs/7794739825/job/21256564318.

This fixes #14.

Ensure that both isort and black are run, and that
both output a diff showing what formatting changes
are required. If either command fails, fail the
make command.
Copy link
Contributor

@achille-roussel achille-roussel left a comment

Choose a reason for hiding this comment

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

Thanks for doing this work 🙌

@chriso chriso merged commit f02e71d into main Feb 6, 2024
3 checks passed
@chriso chriso deleted the ci-fmt-check branch February 6, 2024 06:56
@chriso chriso self-assigned this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check formatting as part of CI
2 participants