-
Notifications
You must be signed in to change notification settings - Fork 117
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
fix: Ensure linting always applied #845
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request ensures that linting errors will cause the CI build to fail. It also adds an auto-formatting step to the CI workflow. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Mr-Sunglasses - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider combining the lint and format steps into a single job to simplify the workflow.
- Committing changes from the auto-formatter might trigger another CI run; consider how to avoid an infinite loop.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
You need to sign your commits. git commit -a --amend -s |
LGTM |
|
||
- name: Auto-format code | ||
run: | | ||
make format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to not create an automated commit just for formatting and simply check for it:
make format | |
make check-format || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just:
"make check-format"
"|| exit 1" will just hide the original exit code. If it's false, it should fail anyway (false is non-zero in bash)
@@ -25,7 +25,16 @@ jobs: | |||
|
|||
- name: Run lint | |||
run: | | |||
make lint | |||
# Ensure linting fails the build if issues are found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: The comment can be removed
fix: #825
Summary by Sourcery
This pull request updates the CI workflow to automatically format code and ensure that linting issues fail the build.
CI: