validateLinkInput function

Future<ValidationErrors> validateLinkInput(
  1. LinkInput input
)

Implementation

Future<ValidationErrors> validateLinkInput(LinkInput input) async {
  final syntaxErrors = syntax.LinkInput.fromJson(input.json).validate();
  if (syntaxErrors.isNotEmpty) {
    return [...syntaxErrors, _semanticValidationSkippedMessage];
  }

  final recordUses = input.recordedUsagesFile;
  return <String>[
    ..._validateHookInput('LinkInput', input),
    if (recordUses != null)
      ..._validateDirectory(
        '$LinkInput.recordUses',
        input.outputDirectoryShared,
      ),
  ];
}