mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #2215 from yh-semmle/java-remove-obsolete-queries
Java: remove some obsolete metric queries
This commit is contained in:
@@ -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()
|
||||
@@ -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
|
||||
@@ -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()
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user