mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Merge pull request #17 from xiemaisi/js/rename-unused-var
Approved by esben-semmle
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user