reportOffset method

void reportOffset(
  1. int offset,
  2. String message
)

Reports a violation at the character offset of the file, described by message.

Implementation

void reportOffset(int offset, String message) {
  final CharacterLocation location = file.lineInfo.getLocation(offset);
  violations.add(
    StyleViolation(
      ruleId: ruleId,
      path: file.path,
      line: location.lineNumber,
      column: location.columnNumber,
      message: message,
    ),
  );
}