postSuccessExitCode function

int postSuccessExitCode(
  1. Hook hook,
  2. List<String> files
)

Exit code after successful tasks given the post-task file list.

Only PreCommitHook without PreCommitHook.allowEmpty fails when empty.

Implementation

int postSuccessExitCode(Hook hook, List<String> files) {
  if (hook case PreCommitHook(allowEmpty: false)) {
    if (files.isEmpty) return 1;
  }
  return 0;
}