mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Fix all metrics-related compilation failures
In hindsight, having a `.getMetrics()` method that just returns `this` is somewhat weird. It's possible that it predates the existence of the inline cast, however.
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
*/
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
|
||||
select sum(Module m | | m.getMetrics().getNumberOfLinesOfCode())
|
||||
select sum(ModuleMetrics m | | m.getNumberOfLinesOfCode())
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
|
||||
import python
|
||||
import semmle.python.filters.GeneratedCode
|
||||
private import LegacyPointsTo
|
||||
|
||||
select sum(Module m |
|
||||
select sum(ModuleMetrics m |
|
||||
exists(m.getFile().getRelativePath()) and
|
||||
not m.getFile() instanceof GeneratedFile
|
||||
|
|
||||
m.getMetrics().getNumberOfLinesOfCode()
|
||||
m.getNumberOfLinesOfCode()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user