mirror of
https://github.com/github/codeql.git
synced 2026-05-03 20:58:03 +02:00
Drop redundant columns from files and folders relations
This commit is contained in:
committed by
Arthur Baars
parent
32253aa868
commit
7f03b87142
@@ -155,7 +155,7 @@ abstract class Container extends @container {
|
||||
|
||||
/** A folder. */
|
||||
class Folder extends Container, @folder {
|
||||
override string getAbsolutePath() { folders(this, result, _) }
|
||||
override string getAbsolutePath() { folders(this, result) }
|
||||
|
||||
/** Gets the URL of this folder. */
|
||||
override string getURL() { result = "folder://" + getAbsolutePath() }
|
||||
@@ -163,11 +163,11 @@ class Folder extends Container, @folder {
|
||||
|
||||
/** A file. */
|
||||
class File extends Container, @file {
|
||||
override string getAbsolutePath() { files(this, result, _, _, _) }
|
||||
override string getAbsolutePath() { files(this, result) }
|
||||
|
||||
/** Gets the URL of this file. */
|
||||
override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
|
||||
|
||||
/** Holds if this file was extracted from ordinary source code. */
|
||||
predicate fromSource() { files(this, _, _, _, 1) }
|
||||
predicate fromSource() { any() }
|
||||
}
|
||||
|
||||
@@ -23,16 +23,12 @@ numlines(
|
||||
|
||||
files(
|
||||
unique int id: @file,
|
||||
string name: string ref,
|
||||
string simple: string ref,
|
||||
string ext: string ref,
|
||||
int fromSource: int ref
|
||||
string name: string ref
|
||||
);
|
||||
|
||||
folders(
|
||||
unique int id: @folder,
|
||||
string name: string ref,
|
||||
string simple: string ref
|
||||
string name: string ref
|
||||
);
|
||||
|
||||
@container = @file | @folder
|
||||
|
||||
Reference in New Issue
Block a user