allFiles property

Future<(List<String>, int?)> get allFiles

Implementation

Future<(List<String>, int?)> get allFiles async {
  final allFiles = await gitService.diffFiles(
    diffArgs: hook.diffArgs,
    diffFilters: hook.diffFilters,
  );

  if (allFiles == null) {
    logger.err('Could not get changed files');
    return (<String>[], 1);
  }

  if (allFiles.isEmpty) {
    logger.info(
      darkGray.wrap('Skipping $hookName hook, no files to process'),
    );
    return (<String>[], 0);
  }

  return (allFiles, null);
}