-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure Ruff formatting errors are picked up in CI #22
Conversation
There were a few errors that had slipped in as CI is not failing on them (yet).
The command was missing the `--check` flag.
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.
Thank you!
@@ -69,8 +69,6 @@ Run all static analysis tools with: | |||
make lint | |||
``` | |||
|
|||
This may make changes to the local files if improvements are available. |
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.
Oh hang on -- Does this mean the linter will not change any code locally?
Perhaps we should introduce pre-commit to do that instead?
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.
or keep pre-commit optional and have a separate format-ci command
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.
We need to decide if make lint
checks formatting or applies formatting - it can't do both. We need the former in CI so I recommend that.
For local formatting, I would recommend both pre-commit and advising people to set-up ruff in their editors.
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.
it can't do both
It can. using pre-commit would allow us to have it make changes and return non-0 if changes were made.
This has the benefit of being able to then show the changes in the CI output if we want
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.
Sure, if you can solve the problem by running pre-commit then that's great.
Will merge this for now to solve the immediate problem.
No description provided.