locationLabel property

String get locationLabel

Formatted file:startLine-endLine label for prompts and CLI output.

Implementation

String get locationLabel {
  final targetFile = resolvedFile.isNotEmpty ? resolvedFile : sourceFile;
  if (targetFile.isEmpty) return '(unresolved source file)';
  if (startLine == null) return targetFile;
  if (endLine == null || endLine == startLine) {
    return '$targetFile:$startLine';
  }
  return '$targetFile:$startLine-$endLine';
}