Merge pull request #2215 from yh-semmle/java-remove-obsolete-queries

Java: remove some obsolete metric queries
This commit is contained in:
Anders Schack-Mulligen
2019-11-12 10:14:55 +01:00
committed by GitHub
6 changed files with 0 additions and 84 deletions

View File

@@ -1,18 +0,0 @@
/**
* @name Display strings of callables
* @kind display-string
* @metricType callable
* @id java/callable-display-strings
*/
import java
private string prefix(Callable c) {
if c instanceof Constructor and c.getDeclaringType() instanceof AnonymousClass
then result = "<anonymous constructor>"
else result = ""
}
from Callable c
where c.fromSource()
select c, prefix(c) + c.getStringSignature()

View File

@@ -1,13 +0,0 @@
/**
* @name Extents of callables
* @kind extent
* @metricType callable
* @id java/callable-extents
*/
import java
import Extents
from RangeCallable c
where c.fromSource()
select c.getLocation(), c

View File

@@ -1,12 +0,0 @@
/**
* @name Source links of callables
* @kind source-link
* @metricType callable
* @id java/callable-source-links
*/
import java
from Callable c
where c.fromSource()
select c, c.getFile()

View File

@@ -1,16 +0,0 @@
/**
* @name Display strings of reference types
* @kind display-string
* @metricType reftype
* @id java/reference-type-display-strings
*/
import java
private string suffix(RefType t) {
if t instanceof AnonymousClass then result = "<anonymous class>" else result = ""
}
from RefType t
where t.fromSource()
select t, t.nestedName() + suffix(t)

View File

@@ -1,13 +0,0 @@
/**
* @name Extents of reftypes
* @kind extent
* @metricType reftype
* @id java/reference-type-extents
*/
import java
import Extents
from RangeRefType t
where t.fromSource()
select t.getLocation(), t

View File

@@ -1,12 +0,0 @@
/**
* @name Source links of reference types
* @kind source-link
* @metricType reftype
* @id java/reference-type-source-links
*/
import java
from RefType t
where t.fromSource()
select t, t.getFile()