Skip to content

Commit d585839

Browse files
committed
Kotlin: exclude Kotlin files from java/underscore-identifier
1 parent 0192ae8 commit d585839

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

java/ql/src/Compatibility/JDK9/UnderscoreIdentifier.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class IdentifierElement extends Element {
2222

2323
from IdentifierElement e, string msg
2424
where
25-
e.fromSource() and
25+
e.getCompilationUnit().isJavaSourceFile() and
2626
not e.(Constructor).isDefaultConstructor() and
2727
(
2828
e.getName() = "_" and
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
| Test.kt:8:14:8:25 | Exception _ | Use of underscore as a one-character identifier. |

0 commit comments

Comments
 (0)