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