Merge pull request #17 from xiemaisi/js/rename-unused-var

Approved by esben-semmle
This commit is contained in:
semmle-qlci
2018-08-07 15:01:37 +01:00
committed by GitHub
3 changed files with 9 additions and 3 deletions

View File

@@ -7,11 +7,15 @@
Unused local variables make code hard to read and understand. Any computation used to initialize
an unused variable is wasted, which may lead to performance problems.
</p>
<p>
Similarly, unused imports and unused functions or classes can be confusing. They may even be
a symptom of a bug caused, for example, by an incomplete refactoring.
</p>
</overview>
<recommendation>
<p>Remove the unused variable.</p>
<p>Remove the unused program element.</p>
</recommendation>
<example>

View File

@@ -1,6 +1,7 @@
/**
* @name Unused variable
* @description Unused variables may be a symptom of a bug and should be examined carefully.
* @name Unused variable, import, function or class
* @description Unused variables, imports, functions or classes may be a symptom of a bug
* and should be examined carefully.
* @kind problem
* @problem.severity recommendation
* @id js/unused-local-variable