Skip to content

Commit

Permalink
chore(neverAccessedVariables): rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jubnzv committed Sep 9, 2024
1 parent c8eb532 commit bd8bb5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/detectors/builtin/neverAccessedVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class NeverAccessedVariables extends Detector {
* monotonic framework and the fixpoint dataflow solver.
*/
checkVariables(cu: CompilationUnit): MistiTactWarning[] {
const errors: MistiTactWarning[] = [];
const warnings: MistiTactWarning[] = [];
const traversedFunctions = new Set<string>();
cu.forEachCFG(cu.ast, (cfg: CFG) => {
if (cfg.origin === "stdlib" || traversedFunctions.has(cfg.name)) {
Expand Down Expand Up @@ -383,7 +383,7 @@ export class NeverAccessedVariables extends Detector {
const suggestion = isWritten
? "The variable value should be accessed"
: "Consider removing the variable";
errors.push(
warnings.push(
this.makeWarning(
msg,
Severity.MEDIUM,
Expand All @@ -397,6 +397,6 @@ export class NeverAccessedVariables extends Detector {
});
});

return errors;
return warnings;
}
}

0 comments on commit bd8bb5c

Please sign in to comment.