Skip to content

Commit c1be93a

Browse files
committed
Exclude .kt files from misnamed reftype query
1 parent e547be5 commit c1be93a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

java/ql/src/Advisory/Naming/NamingConventionsRefTypes.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java
1212

1313
from RefType t
1414
where
15-
t.fromSource() and
15+
t.getFile().isJavaSourceFile() and
1616
not t instanceof AnonymousClass and
1717
not t.getName().substring(0, 1).toUpperCase() = t.getName().substring(0, 1)
1818
select t, "Class and interface names should start in uppercase."
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
| Test.kt:3:23:5:9 | | Class and interface names should start in uppercase. |
2-
| Test.kt:7:9:8:9 | | Class and interface names should start in uppercase. |
3-
| Test.kt:12:1:12:13 | aaaa | Class and interface names should start in uppercase. |

0 commit comments

Comments
 (0)