Skip to content

Commit 32fcfcf

Browse files
authored
Merge pull request github#3912 from aschackmull/location-doc
C++/C#/JavaScript/Python: Port Location qldoc update.
2 parents 993506d + 67db1df commit 32fcfcf

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

cpp/ql/src/semmle/code/cpp/Location.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ class Location extends @location {
1515
/** Gets the file corresponding to this location, if any. */
1616
File getFile() { result = this.getContainer() }
1717

18-
/** Gets the start line of this location. */
18+
/** Gets the 1-based line number (inclusive) where this location starts. */
1919
int getStartLine() { this.fullLocationInfo(_, result, _, _, _) }
2020

21-
/** Gets the start column of this location. */
21+
/** Gets the 1-based column number (inclusive) where this location starts. */
2222
int getStartColumn() { this.fullLocationInfo(_, _, result, _, _) }
2323

24-
/** Gets the end line of this location. */
24+
/** Gets the 1-based line number (inclusive) where this location ends. */
2525
int getEndLine() { this.fullLocationInfo(_, _, _, result, _) }
2626

27-
/** Gets the end column of this location. */
27+
/** Gets the 1-based column number (inclusive) where this location ends. */
2828
int getEndColumn() { this.fullLocationInfo(_, _, _, _, result) }
2929

3030
/**

csharp/ql/src/semmle/code/csharp/Location.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ class Location extends @location {
3838
/** Gets a textual representation of this location. */
3939
string toString() { none() }
4040

41-
/** Gets the start line of this location. */
41+
/** Gets the 1-based line number (inclusive) where this location starts. */
4242
final int getStartLine() { this.hasLocationInfo(_, result, _, _, _) }
4343

44-
/** Gets the end line of this location. */
44+
/** Gets the 1-based line number (inclusive) where this location ends. */
4545
final int getEndLine() { this.hasLocationInfo(_, _, _, result, _) }
4646

47-
/** Gets the start column of this location. */
47+
/** Gets the 1-based column number (inclusive) where this location starts. */
4848
final int getStartColumn() { this.hasLocationInfo(_, _, result, _, _) }
4949

50-
/** Gets the end column of this location. */
50+
/** Gets the 1-based column number (inclusive) where this location ends. */
5151
final int getEndColumn() { this.hasLocationInfo(_, _, _, _, result) }
5252
}
5353

javascript/ql/src/semmle/javascript/Locations.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ class Location extends @location {
1212
/** Gets the file for this location. */
1313
File getFile() { locations_default(this, result, _, _, _, _) }
1414

15-
/** Gets the start line of this location. */
15+
/** Gets the 1-based line number (inclusive) where this location starts. */
1616
int getStartLine() { locations_default(this, _, result, _, _, _) }
1717

18-
/** Gets the start column of this location. */
18+
/** Gets the 1-based column number (inclusive) where this location starts. */
1919
int getStartColumn() { locations_default(this, _, _, result, _, _) }
2020

21-
/** Gets the end line of this location. */
21+
/** Gets the 1-based line number (inclusive) where this location ends. */
2222
int getEndLine() { locations_default(this, _, _, _, result, _) }
2323

24-
/** Gets the end column of this location. */
24+
/** Gets the 1-based column number (inclusive) where this location ends. */
2525
int getEndColumn() { locations_default(this, _, _, _, _, result) }
2626

2727
/** Gets the number of lines covered by this location. */

python/ql/src/semmle/python/Files.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,25 +369,25 @@ class Location extends @location {
369369
exists(Module m | locations_ast(this, m, _, _, _, _) | result = m.getPath())
370370
}
371371

372-
/** Gets the start line of this location */
372+
/** Gets the 1-based line number (inclusive) where this location starts. */
373373
int getStartLine() {
374374
locations_default(this, _, result, _, _, _) or
375375
locations_ast(this, _, result, _, _, _)
376376
}
377377

378-
/** Gets the start column of this location */
378+
/** Gets the 1-based column number (inclusive) where this location starts. */
379379
int getStartColumn() {
380380
locations_default(this, _, _, result, _, _) or
381381
locations_ast(this, _, _, result, _, _)
382382
}
383383

384-
/** Gets the end line of this location */
384+
/** Gets the 1-based line number (inclusive) where this location ends. */
385385
int getEndLine() {
386386
locations_default(this, _, _, _, result, _) or
387387
locations_ast(this, _, _, _, result, _)
388388
}
389389

390-
/** Gets the end column of this location */
390+
/** Gets the 1-based column number (inclusive) where this location ends. */
391391
int getEndColumn() {
392392
locations_default(this, _, _, _, _, result) or
393393
locations_ast(this, _, _, _, _, result)

0 commit comments

Comments
 (0)