validate method

List<String> validate()

Implementation

List<String> validate() {
  final errors = <String>[];
  if (filePath.isEmpty) {
    errors.add('Missing required parameter: file_path');
  } else if (!p.isAbsolute(filePath)) {
    errors.add('file_path must be an absolute path, got: $filePath');
  }
  if (oldString.isNotEmpty && oldString == newString) {
    errors.add(
      'No changes to make: old_string and new_string are exactly the same.',
    );
  }
  return errors;
}