drop MetricFile class

This commit is contained in:
Alex Ford
2021-04-21 10:45:42 +01:00
parent c6b6a83501
commit 9d117d10b8
4 changed files with 3 additions and 9 deletions

View File

@@ -169,12 +169,6 @@ class File extends Container, @file {
/** Gets the URL of this file. */
override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
/** Gets the metric file. */
MetricFile getMetrics() { result = this }
}
/** A wrapper providing metrics for a file */
class MetricFile extends File {
/** Gets the number of lines in this file. */
int getNumberOfLines() { result = max(getAToken().getLocation().getEndLine()) }

View File

@@ -10,5 +10,5 @@
import ruby
from File f, int n
where n = f.getMetrics().getNumberOfLines()
where n = f.getNumberOfLines()
select f, n order by n desc

View File

@@ -11,5 +11,5 @@
import ruby
from File f, int n
where n = f.getMetrics().getNumberOfLinesOfCode()
where n = f.getNumberOfLinesOfCode()
select f, n order by n desc

View File

@@ -10,5 +10,5 @@
import ruby
from File f, int n
where n = f.getMetrics().getNumberOfLinesOfComments()
where n = f.getNumberOfLinesOfComments()
select f, n order by n desc