<commit_before>part of hop;

// TODO: add some names and descriptions so these are more easily
// understood at runtime

class RunResult {
  // See http://tldp.org/LDP/abs/html/exitcodes.html
  // Accessed 2012-11-07

  /// Ran successfully
  static final RunResult SUCCESS = const RunResult._internal(0, 'SUCCESS');

  /// C/C++ standard for bad usage. Hop was called incorrectly
  static final RunResult BAD_USAGE = const RunResult._internal(64, 'BAD USAGE');

  /// Task was was started and failed gracefully
  static final RunResult FAIL = const RunResult._internal(80, 'FAIL');

  /// Task was was started, but threw an exception
  static final RunResult EXCEPTION = const RunResult._internal(81, 'EXCEPTION');

  /// Task misbehaved. Returned null, used TaskContext incorrectly, etc.
  static final RunResult ERROR = const RunResult._internal(82, 'ERROR');

  final int exitCode;
  final String name;

  const RunResult._internal(this.exitCode, this.name);

  bool get success => exitCode == SUCCESS.exitCode;

  String toString() => 'RunResult $name ($exitCode)';
}<commit_msg>hop: RunResult: better doc comments<commit_after>part of hop;

/**
 * For explanations of exit codes see <http://tldp.org/LDP/abs/html/exitcodes.html>
 */
class RunResult {

  /**
   * Ran successfully
   *
   * Code 0
   */
  static final RunResult SUCCESS = const RunResult._internal(0, 'SUCCESS');

  /**
   * Hop was called with bad arguments.
   *
   * Code 64
   *
   * See `EX_USAGE` in <http://www.retro11.de/ouxr/211bsd/usr/include/sysexits.h.html>
   */
  static final RunResult BAD_USAGE = const RunResult._internal(64, 'BAD USAGE');

  /**
   * Task was was started and failed gracefully
   *
   * Code 80
   */
  static final RunResult FAIL = const RunResult._internal(80, 'FAIL');

  /**
   * Task was was started, but threw an exception
   *
   * Code 81
   */
  static final RunResult EXCEPTION = const RunResult._internal(81, 'EXCEPTION');

  /**
   * Task misbehaved. Returned null, used [TaskContext] incorrectly, etc.
   *
   * Code 82
   */
  static final RunResult ERROR = const RunResult._internal(82, 'ERROR');

  final int exitCode;
  final String name;

  const RunResult._internal(this.exitCode, this.name);

  bool get success => exitCode == SUCCESS.exitCode;

  String toString() => 'RunResult $name ($exitCode)';
}
{'fraction_non_alphanumeric': 0.1172680412371134, 'fraction_numerical': 0.01718213058419244, 'mean_word_length': 3.4109848484848486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6315405', 'n_tokens_mistral': 756, 'n_tokens_neox': 701, 'n_words': 228}