mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
remove redundant inline casts in arguments where the type is inferred by the call target
This commit is contained in:
@@ -210,9 +210,9 @@ class CommentedOutCodeBlock extends @py_comment {
|
||||
|
||||
/** Whether this commented-out code block is likely to be example code embedded in a larger comment. */
|
||||
predicate maybeExampleCode() {
|
||||
exists(CommentBlock block | block.contains(this.(Comment)) |
|
||||
exists(CommentBlock block | block.contains(this) |
|
||||
exists(int all_code |
|
||||
all_code = sum(CommentedOutCodeBlock code | block.contains(code.(Comment)) | code.length()) and
|
||||
all_code = sum(CommentedOutCodeBlock code | block.contains(code) | code.length()) and
|
||||
/* This ratio may need fine tuning */
|
||||
block.length() > all_code * 2
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user