Skip to content

Commit

Permalink
fix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 8, 2025
1 parent 2ed146e commit c2fbc37
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cmd/tools/vvet/analysis.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ mut:
fn (mut vt Vet) repeated_code(expr ast.Expr) {
match expr {
ast.IndexExpr {
// lock vt.analysis.repeated {
// vt.analysis.repeated['${expr.left}[${expr.index}]'][vt.file] << expr.pos
// }
lock vt.analysis.repeated {
vt.analysis.repeated['${expr.left}[${expr.index}]'][vt.file] << expr.pos
}
}
ast.CallExpr {
// lock vt.analysis.repeated {
// if expr.is_static_method || expr.is_method {
// vt.analysis.repeated['${expr.left}.${expr.name}(${expr.args.map(it.str()).join(', ')})'][vt.file] << expr.pos
// } else {
// vt.analysis.repeated['${expr.mod}.${expr.name}(${expr.args.map(it.str()).join(', ')})'][vt.file] << expr.pos
// }
// }
lock vt.analysis.repeated {
if expr.is_static_method || expr.is_method {
vt.analysis.repeated['${expr.left}.${expr.name}(${expr.args.map(it.str()).join(', ')})'][vt.file] << expr.pos
} else {
vt.analysis.repeated['${expr.mod}.${expr.name}(${expr.args.map(it.str()).join(', ')})'][vt.file] << expr.pos
}
}
}
else {}
}
Expand Down

0 comments on commit c2fbc37

Please sign in to comment.