Commit Graph

72 Commits

Author SHA1 Message Date
Tamas Vajk
5cc2868857 Kotlin: Report CFG dead end consistency issues on ErrorExpr 2022-12-13 15:51:33 +01:00
Chris Smowton
8ca05d8fef Exclude annotations from consistency check due to intentionally missing children 2022-12-09 10:33:05 +00:00
Tamas Vajk
3b09cb2224 WIP: Extract annotation values (tests are missing) 2022-12-09 10:31:33 +00:00
Tamas Vajk
44e70afa85 Kotlin: Extract missing arguments of enum constructor calls 2022-11-07 10:07:04 +01:00
Chris Smowton
ee63e60bb7 qlpacks: libraryPathDependencies -> dependencies 2022-10-28 16:07:36 +01:00
Tamas Vajk
7ceadb0df0 Kotlin: Remove javaEquivalent consistency query
The `javaEquivalent` consistency query is no longer needed, as the `diags` query is now a superset of it.
2022-10-28 10:44:42 +02:00
Ian Lynagh
4050801a17 Kotlin: Autoformat query 2022-10-25 16:26:12 +01:00
Ian Lynagh
caf7ebc634 Java/Kotlin: Add a diagnostic consistency query 2022-10-25 16:26:11 +01:00
Chris Smowton
1d8547d4c1 Avoid using count(...) = 0 2022-10-06 12:57:56 +01:00
Chris Smowton
764c139e3e Visibility consistency query: allow $default methods to have package-private (default) visibility 2022-10-06 12:40:03 +01:00
Tamas Vajk
11de55e3cb Kotlin: Add consistency query to check missing java equivalent functions 2022-09-30 16:28:26 +02:00
erik-krogh
ce9f69a639 rename all occurrences of XML to Xml 2022-08-22 14:08:31 +02:00
Chris Smowton
7475f84ea5 Fix type-parameter-out-of-scope test 2022-07-28 15:51:59 +01:00
Chris Smowton
dd93062101 Kotlin: Mangle names of internal functions to match JVM symbols 2022-06-30 21:56:25 +01:00
Chris Smowton
a124d83265 Autoformat 2022-06-23 20:13:27 +01:00
Chris Smowton
af5230349b Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
This avoids DB inconsistencies because complex initialisers are extracted to more than one function.
2022-06-23 16:26:54 +01:00
Ian Lynagh
52b229052d Kotlin/Java: Add the beginnings of a "visibility" consistency query 2022-06-21 17:24:37 +01:00
Chris Smowton
c9232c075c Autoformat 2022-05-19 15:18:10 +01:00
Chris Smowton
4f08981586 Expand warning message to note that there are known Java extractor bugs relating to this query 2022-05-19 13:37:18 +01:00
Chris Smowton
e722c99218 Autoformat 2022-05-19 11:55:31 +01:00
Chris Smowton
49c9c36daf Type-variable-in-scope consistency query: account for all enclosing elements that declare type parameters. 2022-05-19 11:55:31 +01:00
Chris Smowton
048a530aac Type parameter scoping check: distinguish type arguments from type parameters
I had forgotten that the Java QL lib regards a ParameterizedType as either an instantiation Generic<String>, or the unbound declaration Generic<T>.
2022-05-19 11:55:31 +01:00
Chris Smowton
d291e0cf10 Fix typeParametersInScope consistency query
The selection of type variables mentioned in a particular class previously didn't work as intended, so the consistency query would always pass.
2022-05-19 11:55:31 +01:00
Ian Lynagh
33e17f1665 Kotlin: Fix some alerts 2022-05-11 17:58:50 +01:00
Ian Lynagh
1151f79eca Kotlin: Apply some review feedback 2022-05-10 19:51:31 +01:00
Tamas Vajk
ad11b3e84a Add consistency query to verify we always have qualifier for calls 2022-05-10 19:51:27 +01:00
Ian Lynagh
77fec17a36 Kotlin: Autoformat QL 2022-05-10 19:51:25 +01:00
Tony Torralba
64531dd717 Fix AST representation of WhenExpr and WhenBranch 2022-05-10 19:51:22 +01:00
Chris Smowton
7fe260c1a2 Convert type-parameter-out-of-scope warning into consistency query
The warning in the extractor is inaccurate due to references to enclosing types' type parameters. A consistency query can check that the type parameter is indeed in scope exploiting broader knowledge of the enclosing types.
2022-05-10 19:51:17 +01:00
Ian Lynagh
03c1845053 Kotlin: Add a TODO comment 2022-05-10 19:51:15 +01:00
Ian Lynagh
76ca0b2776 Kotlin: Pull Kotlin type for localvars out into its own table 2022-05-10 19:51:15 +01:00
Ian Lynagh
7862229807 Kotlin: Pull Kotlin type for params out into its own table 2022-05-10 19:51:15 +01:00
Ian Lynagh
dc26abe341 Kotlin: Pull Kotlin type for methods/constrs out into their own tables 2022-05-10 19:51:15 +01:00
Ian Lynagh
ee008773dc Kotlin: Pull Kotlin type for fields out into its own table 2022-05-10 19:51:15 +01:00
Ian Lynagh
0f7f90dd4e Kotlin: Add a consistency query for Kotlin types 2022-05-10 19:51:15 +01:00
Ian Lynagh
89eae2407b Kotlin: Improve error handling
Each compilation, and each file within a cmopilation, now gets a
"result" indicating whether it had recoverable or non-recoverable
errors.
2022-05-10 19:51:15 +01:00
Chris Smowton
20d56094ee Note that unusedLocation can raise an alert for used but inaccessible locations 2022-05-10 19:51:13 +01:00
Tamas Vajk
44b731c68e Exclude extraction of fake overridden properties 2022-05-10 19:51:13 +01:00
Tamas Vajk
b6e5e1977d Extract more visibility modifiers 2022-05-10 19:51:13 +01:00
Ian Lynagh
2f435a1a95 Kotlin: file_classes consistency check now passes 2022-05-10 19:51:12 +01:00
Ian Lynagh
08bb134022 Java/Kotlin: Tweak consistency queries 2022-05-10 19:51:11 +01:00
Ian Lynagh
7c03ed99dc Java/Kotlin: Add File.is{,Java,Kotlin}SourceFile() 2022-05-10 19:51:10 +01:00
Ian Lynagh
b38f47f9ea Java/Kotlin: Tweak consistency queries 2022-05-10 19:51:10 +01:00
Ian Lynagh
c04912701a Java/Kotlin: Speed up toString.ql
It's less informative now, but manual debugging will likely be needed
to investigate failures.
2022-05-10 19:51:10 +01:00
Ian Lynagh
ab93d166b8 Java/Kotlin: Tweak consistency queries 2022-05-10 19:51:10 +01:00
Ian Lynagh
509860b7cf Kotlin: Add a file_classes consistency query 2022-05-10 19:51:09 +01:00
Tamás Vajk
04daa7f28f Revert "Kotlin: Fix extraction of dispatch and extension receivers" 2022-05-10 19:51:08 +01:00
Ian Lynagh
7ca6da1d13 Kotlin/Java: children consistency query: extension receiver is now a gap 2022-05-10 19:51:07 +01:00
Ian Lynagh
25ccf0569e Kotlin: ReturnStmt CFG isn't handled properly yet 2022-05-10 19:51:07 +01:00
Ian Lynagh
db7f5a04be Kotlin: BreakStmt CFG isn't handled properly yet 2022-05-10 19:51:07 +01:00