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

E0011 #85

Merged
merged 11 commits into from
Jul 3, 2024
Merged

E0011 #85

merged 11 commits into from
Jul 3, 2024

Conversation

denzyldick
Copy link
Owner

No description provided.

@denzyldick denzyldick changed the title E00011 E0011 Jul 3, 2024
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

clippy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

let flatten_statements = self.travers_statements_to_validate(vec![].clone(), statement);
for statement in flatten_statements {
match statement {
Statement::Expression(ExpressionStatement { expression, ending }) => {

Check warning

Code scanning / clippy

unused variable: ending Warning

unused variable: ending
}
}
Statement::Return(ReturnStatement {
r#return,

Check warning

Code scanning / clippy

unused variable: return Warning

unused variable: return
Statement::Return(ReturnStatement {
r#return,
value,
ending,

Check warning

Code scanning / clippy

unused variable: ending Warning

unused variable: ending
String::from(DESCRIPTION)
}

fn validate(&self, file: &File, statement: &Statement) -> Vec<Violation> {

Check warning

Code scanning / clippy

unused variable: file Warning

unused variable: file
let flatten_statements = self.travers_statements_to_validate(vec![].clone(), statement);
for statement in flatten_statements {
match statement {
Statement::Expression(ExpressionStatement { expression, ending }) => {

Check warning

Code scanning / clippy

unused variable: ending Warning

unused variable: ending
value,
ending,
}) => match value {
Some(Expression::ErrorSuppress(ErrorSuppressExpression { at, expr })) => {

Check warning

Code scanning / clippy

unused variable: expr Warning

unused variable: expr
Comment on lines +29 to +40
match expression {
Expression::ErrorSuppress(ErrorSuppressExpression { at, expr }) => {
let suggestion = "Error supression(@) symbol found. Remove it.".to_string();
violation.push(Violation {
rule: String::from(CODE),
line: at.line.to_string(),
suggestion,
span: *at,
});
}
_ => {}
}

Check warning

Code scanning / clippy

this match can be collapsed into the outer match Warning

this match can be collapsed into the outer match
Comment on lines +46 to +57
}) => match value {
Some(Expression::ErrorSuppress(ErrorSuppressExpression { at, expr })) => {
let suggestion = "Error supression(@) symbol found. Remove it. ".to_string();
violation.push(Violation {
rule: String::from(CODE),
line: at.line.to_string(),
suggestion,
span: *at,
});
}
_ => {}
},

Check warning

Code scanning / clippy

this match can be collapsed into the outer match Warning

this match can be collapsed into the outer match
Comment on lines +29 to +40
match expression {
Expression::ErrorSuppress(ErrorSuppressExpression { at, expr }) => {
let suggestion = "Error supression(@) symbol found. Remove it.".to_string();
violation.push(Violation {
rule: String::from(CODE),
line: at.line.to_string(),
suggestion,
span: *at,
});
}
_ => {}
}

Check warning

Code scanning / clippy

you seem to be trying to use match for destructuring a single pattern. Consider using if let Warning

you seem to be trying to use match for destructuring a single pattern. Consider using if let
Comment on lines +46 to +57
}) => match value {
Some(Expression::ErrorSuppress(ErrorSuppressExpression { at, expr })) => {
let suggestion = "Error supression(@) symbol found. Remove it. ".to_string();
violation.push(Violation {
rule: String::from(CODE),
line: at.line.to_string(),
suggestion,
span: *at,
});
}
_ => {}
},

Check warning

Code scanning / clippy

you seem to be trying to use match for destructuring a single pattern. Consider using if let Warning

you seem to be trying to use match for destructuring a single pattern. Consider using if let
@denzyldick denzyldick merged commit b250504 into main Jul 3, 2024
3 checks passed
@denzyldick denzyldick deleted the E00011 branch July 3, 2024 19:43
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.

1 participant