mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
JavaScript: Make File not extend Locatable anymore.
Files have strange `:0:0:0:0` locations for... reasons. This makes the predicates inherited from `Locatable` meaningless. A particularly bad case is `getNumLines()`, which will always return one. The right predicate to use is, of course, `getNumberOfLines()`, which is defined in `File` itself.
This commit is contained in:
@@ -198,8 +198,8 @@ class Folder extends Container, @folder {
|
||||
}
|
||||
|
||||
/** A file. */
|
||||
class File extends Container, @file, Locatable {
|
||||
override Location getLocation() { hasLocation(this, result) }
|
||||
class File extends Container, @file {
|
||||
Location getLocation() { hasLocation(this, result) }
|
||||
|
||||
override string getAbsolutePath() { files(this, result, _, _, _) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user