-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feat: add comparison_to_empty #130
Feat: add comparison_to_empty #130
Conversation
fn create_diagnostic(message: &str, stable_ptr: SyntaxStablePtrId, severity: Severity) -> PluginDiagnostic { | ||
PluginDiagnostic { stable_ptr, message: message.to_string(), severity } | ||
} |
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.
don't need this function, directly create the diagnostic
@@ -11,3 +11,4 @@ pub mod loops; | |||
pub mod manual; | |||
pub mod panic; | |||
pub mod single_match; | |||
// pub mod comparison_to_empty; |
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.
uncomment that
Alright @0xLucqs |
…iagnostic where it's needed
@0xLucqs i have made the requested changes |
fix clippy and don't forget to format |
ok |
you need to add the tests to the test file similarly to how it's done with others |
@0xLucqs |
fix the tests, remove the useless added file and restore the cargo.lock plz |
and resolve conflicts |
alright |
closes #74
@0xLucqs
This is a draft PR
Implementation
Checks for comparing to an empty slice such as [], and suggests using .is_empty() where applicable.