mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Python: Remove code duplication library
This commit is contained in:
13
python/ql/src/external/SimilarFunction.ql
vendored
13
python/ql/src/external/SimilarFunction.ql
vendored
@@ -16,16 +16,7 @@
|
||||
*/
|
||||
|
||||
import python
|
||||
import CodeDuplication
|
||||
|
||||
predicate relevant(Function m) { m.getMetrics().getNumberOfLinesOfCode() > 10 }
|
||||
|
||||
from Function m, Function other, string message, int percent
|
||||
where
|
||||
similarScopes(m, other, percent, message) and
|
||||
relevant(m) and
|
||||
percent > 95.0 and
|
||||
not duplicateScopes(m, other, _, _) and
|
||||
not duplicateScopes(m.getEnclosingModule(), other.getEnclosingModule(), _, _) and
|
||||
not duplicateScopes(m.getScope(), other.getScope(), _, _)
|
||||
from Function m, Function other, string message
|
||||
where none()
|
||||
select m, message, other, other.getName()
|
||||
|
||||
Reference in New Issue
Block a user