From c2fbc37182aa7dad683239a7351fc8c313bac5d5 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 8 Jan 2025 00:09:42 -0300 Subject: [PATCH] fix cleanup --- cmd/tools/vvet/analysis.v | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/tools/vvet/analysis.v b/cmd/tools/vvet/analysis.v index 9fa13d4d6a3283..7e661a6898808d 100644 --- a/cmd/tools/vvet/analysis.v +++ b/cmd/tools/vvet/analysis.v @@ -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 {} }