inRange checks if a statement's position range is within the target range.
(start, end, targetStart, targetEnd *storepb.Position)
| 426 | |
| 427 | // inRange checks if a statement's position range is within the target range. |
| 428 | func inRange(start, end, targetStart, targetEnd *storepb.Position) bool { |
| 429 | if start.Line < targetStart.Line || (start.Line == targetStart.Line && start.Column < targetStart.Column) { |
| 430 | return false |
| 431 | } |
| 432 | if end.Line > targetEnd.Line || (end.Line == targetEnd.Line && end.Column > targetEnd.Column) { |
| 433 | return false |
| 434 | } |
| 435 | return true |
| 436 | } |
no outgoing calls
no test coverage detected