Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Add formatting step to CI #120

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Add formatting step to CI #120

merged 1 commit into from
Nov 28, 2024

Conversation

poppysec
Copy link
Contributor

No description provided.

@poppysec poppysec requested a review from lukehinds November 28, 2024 15:45
@@ -48,6 +48,9 @@ jobs:
- name: Run linting
run: make lint

- name: Run formatting
Copy link
Contributor

Choose a reason for hiding this comment

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

should we make the CI step explicitly fail if there are any changes afterwards?

if [[ -n "$(git status --porcelain)" ]]; then
          echo "Formatting produced changes. Please run 'make format' locally and commit the changes."
          exit 1
        fi

Choose a reason for hiding this comment

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

I think it might actually fail is , should do a sys.exit code of 1, but I will check

Choose a reason for hiding this comment

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

ah no, it also formats it as well!

Choose a reason for hiding this comment

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

So this will automatically format everything in the PR, unless that command fails, at which point CI will fail too.

@@ -48,6 +48,9 @@ jobs:
- name: Run linting
run: make lint

- name: Run formatting

Choose a reason for hiding this comment

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

ah no, it also formats it as well!

@lukehinds lukehinds merged commit b8a6e80 into main Nov 28, 2024
2 checks passed
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