mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
JS: Remove code duplication library
This commit is contained in:
@@ -16,15 +16,10 @@
|
||||
*/
|
||||
|
||||
import javascript
|
||||
import CodeDuplication
|
||||
import semmle.javascript.RestrictedLocations
|
||||
|
||||
from Function f, Function g, float percent
|
||||
where
|
||||
duplicateContainers(f, g, percent) and
|
||||
f.getNumBodyStmt() > 5 and
|
||||
not duplicateContainers(f.getEnclosingStmt().getContainer(), g.getEnclosingStmt().getContainer(),
|
||||
_)
|
||||
where none()
|
||||
select f.(FirstLineOf),
|
||||
percent.floor() + "% of statements in " + f.describe() + " are duplicated in $@.",
|
||||
g.(FirstLineOf), g.describe()
|
||||
|
||||
Reference in New Issue
Block a user