Merge pull request #11436 from igfoo/igfoo/NamingConventionsRefTypes

Kotlin: Enable java/misnamed-type query
This commit is contained in:
Ian Lynagh
2022-11-29 18:39:18 +00:00
committed by GitHub
6 changed files with 61 additions and 10 deletions

View File

@@ -12,7 +12,8 @@ import java
from RefType t
where
t.getFile().isJavaSourceFile() and
t.fromSource() and
not t instanceof AnonymousClass and
not t.isCompilerGenerated() and
not t.getName().substring(0, 1).toUpperCase() = t.getName().substring(0, 1)
select t, "Class and interface names should start in uppercase."

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The query `java/misnamed-type` is now enabled for Kotlin.