feat: Added lint and format check to the CI/CD pipeline#1392
Conversation
Added a linting and formatting check to the CI - PR workflow. This check will not modify any files, it will only check the files included in the PR and check whether they pass the lint and format standards. Signed-off-by: Luka Dojcinovic <56648891+Luka-D@users.noreply.github.com>
|
@Vezio Can you run the workflows again please? I think the linting will fail again, but that's ok, I want to make sure the more verbose output works. After that I'll fix the lint errors and make another commit. Thank you 😃 |
Signed-off-by: Luka Dojcinovic <56648891+Luka-D@users.noreply.github.com>
|
Looks like there was an outage with actions: https://www.githubstatus.com/ |
|
@Luka-D I have re-run all jobs (indeed there was a period of outage on GitHub), and it looks like a legitimate failure on |
|
Yes, that is the expected behavior. The current codebase has some lint errors that were detected by Ruff and so the workflow failed. I didn't configure the workflow to modify any of the files, so the expected resolution to this is for the PR owner to manually run Since the pre-commit change was merged recently, there are probably some lint errors that slipped through the cracks. I will make the necessary lint fixes on this branch and make another commit. The lint check should pass afterwards. Hopefully in the future all lint errors will be caugh by |
Lint errors either involved unused imports, having exception as e (if e is never used) or declaring variables which are never used (This error is skipped using # noqa: F841). Signed-off-by: Luka Dojcinovic <56648891+Luka-D@users.noreply.github.com>
|
Alright, the lint check passed now, but the format check failed because there are quite a few files that are not formatted yet. I'll make a new branch where I'll format all the existing files in the code base. Once those are formatted, both checks should succeed. I apologize for the confusion. |
|
@Luka-D Not a problem at all. Thank you very much for the contributions! |
|
My pleasure! Please see #1428 for part 1 of the formatting changes. |

Part of #938, this change introduces a new workflow step where ruff is used to check whether the files within a PR pass the lint and format rules. Now with more verbosity for lint and format checks.