Skip to content

Commit c426637

Browse files
committed
Exclude .kt files from ignored return value query
1 parent 5f6f72b commit c426637

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

java/ql/src/Likely Bugs/Statements/ReturnValueIgnored.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ predicate isMustBeQualifierMockingMethod(Method m) {
7575

7676
predicate relevantMethodCall(MethodAccess ma, Method m) {
7777
// For "return value ignored", all method calls are relevant.
78+
not ma.getFile().isKotlinSourceFile() and
7879
ma.getMethod() = m and
7980
not m.getReturnType().hasName("void") and
8081
(not isMockingMethod(m) or isMustBeQualifierMockingMethod(m)) and
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| Test.kt:14:29:14:33 | foo(...) | The result of the call is ignored, but 90% of calls to foo use the return value. |

0 commit comments

Comments
 (0)