Commit Graph

30 Commits

Author SHA1 Message Date
Nick Rolfe
c199d0cbbe Java: use overlayChangedFiles in discard prediactes 2025-07-15 10:10:32 +01:00
Kasper Svendsen
6e92d7e247 Java: Add entity discard predicates 2025-06-24 10:38:06 +02:00
Kasper Svendsen
c207cfdeb7 Overlay: Add overlay annotations to Java & shared libraries 2025-06-24 10:25:06 +02:00
Ian Lynagh
bda779a58d Java: Deprecate Field.getSourceDeclaration() and Field.isSourceDeclaration()
Also follows the removal of the sourceid column of fields.
2024-09-24 14:06:54 +01:00
Ian Lynagh
9f1c251809 Java: Follow removeal of typeVars.kind in qlls 2024-09-17 11:39:07 +01:00
Chris Smowton
3514dd1e4d Java: merge the @class and @interface database types and tables
This will allow the extractor to emit class(id, ...) when all it knows about a class is its name, due to not having it available on the classpath. Previously it would have had to guess whether it belonged to @class or @interface, possibly introducing an inconsistency.
2023-02-14 17:21:23 +00:00
Chris Smowton
3fa1f17b83 Java: really return a unique location for non-source entities
This was always supposed to pick one of several candidate non-source locations (usually for a generic type instantiation), but since `getFile().toString()` just produces the basename of the class file actually the results would almost always tie and all of the candidate locations would be returned. Use the full class file path as a tiebreaker instead.
2022-09-16 18:23:31 +01:00
Ian Lynagh
501a9b3c6b Make *.qll non-executable 2022-08-24 16:36:15 +01:00
Chris Smowton
17dd1f64ec Java: pick an arbitrary representative location when an entity has many candidate locations. 2022-08-18 14:29:16 +01:00
Ian Lynagh
1730ec22d9 Kotlin: Extract an ErrorType if we fail to correctly extract a type 2022-07-01 16:33:43 +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
7c03ed99dc Java/Kotlin: Add File.is{,Java,Kotlin}SourceFile() 2022-05-10 19:51:10 +01:00
Ian Lynagh
e6e56238c5 Kotlin: Handle properties better 2022-05-10 19:51:03 +01:00
Chris Smowton
1b7e33b6e3 Remove Kotlin element and component type from arrays
Now that these are no longer required, array extraction can extract kt-types consistently with other parameterised classes.
2022-05-10 19:51:03 +01:00
Ian Lynagh
87b433142c Kotlin: Add support for Kotlin type aliases 2022-05-10 19:51:01 +01:00
Ian Lynagh
6cf0b755f0 Kotlin: Add KotlinType to localvars 2022-05-10 19:51:00 +01:00
Ian Lynagh
06a41b3923 Kotlin: Add KotlinTypes to arrays 2022-05-10 19:51:00 +01:00
Ian Lynagh
ef22194eed Kotlin: Add KotlinType to params 2022-05-10 19:51:00 +01:00
Ian Lynagh
0d5e471b96 Kotlin: Give methods and constructors a KotlinType 2022-05-10 19:51:00 +01:00
Ian Lynagh
c20ee76826 Kotlin: Give fields a Kotlin type
This meant refactoring the EnumEntry extraction a bit. The IR doesn't
give us a type for fields, so we have to make it up based on the parent.
2022-05-10 19:51:00 +01:00
Ian Lynagh
14a10564f3 Kotlin: Fix File locations, and fromSource/hasSourceLocation for Kotlin code 2022-05-10 18:46:01 +01:00
Erik Krogh Kristensen
caeeebf572 add explicit this qualifier on all of java 2021-10-15 15:27:37 +02:00
Rasmus Wriedt Larsen
987b573709 Fix hasLocationInfo URL reference
Follow up to https://github.com/github/codeql/pull/5830
2021-09-29 13:47:58 +02:00
Tom Hvitved
9fdcacd865 Java: Drop redundant columns from files and folders relations 2021-09-13 16:09:47 +02:00
Ian Lynagh
4fbb165dce Java: Use the standard URL format for Location.toString() 2021-09-13 12:53:50 +01:00
Ian Lynagh
a9db1c52e5 All languages: Add getPrimaryQlClasses()
This is a non-overridable predicate that concatenates all the
getAPrimaryQlClass() results into a comma-separated string.
2021-08-23 15:49:10 +01:00
Andrew Eisenberg
8e750f18ad Packaging: Java refactoring
Split java pack into `codeql/java-all` and `codeql/java-queries`.
2021-08-19 14:09:35 -07:00