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

Support file formatting and linting #38

Merged
merged 11 commits into from
Feb 1, 2025
Merged

Support file formatting and linting #38

merged 11 commits into from
Feb 1, 2025

Conversation

dkcumming
Copy link
Collaborator

@dkcumming dkcumming commented Jan 31, 2025

This PR will add code quality checks to CI through cargo clippy and cargo fmt

Closes #37

@dkcumming dkcumming self-assigned this Jan 31, 2025
@@ -1,8 +1,14 @@
mod common;
use common::*;
use smir_pretty::{stable_mir_driver, print_all_items_verbose};
use smir_pretty::{print_all_items_verbose, stable_mir_driver};
Copy link
Member

Choose a reason for hiding this comment

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

I think this is actually dead code? Cannot find any print_all_items_verbose 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will add an issue to go through and see if we can clean up old comments and unused imports!

Copy link
Member

@jberthold jberthold left a comment

Choose a reason for hiding this comment

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

LGTM. Massive diff, I trust it is all about formatting... (tests are passing ✔️ )

Copy link

@gtrepta gtrepta left a comment

Choose a reason for hiding this comment

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

LGTM. Just one comment.

Comment on lines 63 to 64
run: | # Warning check should be redundant
RUSTFLAGS='--deny warnings' cargo build -vv
Copy link

Choose a reason for hiding this comment

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

What does this comment mean? Maybe it would make more sense to put --deny warnings in the build step for code-quality?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is, I think that cargo clippy should catch every error the compiler would have.It is redundant, should I just remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This made me realise that the integration-tests job wasn't dependent on code-quality. I think we normally do that and so I have changed it

@dkcumming
Copy link
Collaborator Author

LGTM. Massive diff, I trust it is all about formatting... (tests are passing ✔️ )

Yeah it is all formatting changes

@dkcumming dkcumming merged commit a654f7e into master Feb 1, 2025
2 checks passed
@dkcumming dkcumming deleted the dc/linting branch February 1, 2025 03:35
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.

Add file formating and linting
3 participants