Skip to content

Commit 4d73e1a

Browse files
Remove getLocationOrdinal
1 parent 6f5ac5d commit 4d73e1a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/codeql/queries/unique-command-use.ql

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@
4040
* the alert.
4141
*/
4242
CommandUsage getFirstUsage() {
43-
result = max(CommandUsage use | use = this.getAUse() | use order by use.getLocationOrdinal())
43+
result =
44+
max(CommandUsage use |
45+
use = this.getAUse()
46+
|
47+
use
48+
order by
49+
use.getFile().getRelativePath(), use.getLocation().getStartLine(),
50+
use.getLocation().getStartColumn()
51+
)
4452
}
4553
}
4654

@@ -50,16 +58,6 @@
5058
*/
5159
abstract class CommandUsage extends Locatable {
5260
abstract string getCommandName();
53-
54-
/**
55-
* Used as a way of ordering locations. The implementation is basically
56-
* arbitrary, so long as the ordering is consistent across analyses.
57-
*/
58-
string getLocationOrdinal() {
59-
result =
60-
this.getFile().getRelativePath() + ":" + this.getLocation().getStartLine() + ":" +
61-
this.getLocation().getStartColumn()
62-
}
6361
}
6462

6563
/**

0 commit comments

Comments
 (0)