HooksConfig constructor

const HooksConfig({
  1. @Default(false) bool continueOnRejected,
  2. String? configFile,
})

Default constructor

Implementation

const factory HooksConfig({
  /// Specifies, whether processing should continue on rejections.
  ///
  /// Normally, once one of the hook operations detects an unfixable problem,
  /// the whole process is aborted with [HookResult.rejected]. If however
  /// [continueOnRejected] is set to true, instead processing will continue as
  /// usual. In both cases, the hooks will resolve with [HookResult.rejected].
  @Default(false) bool continueOnRejected,

  /// Specifies the path to the configuration file.
  ///
  /// If not specified, the tool tries to read the configuration from the
  /// pubspec.yaml. This will work as long as the pubspec is located in the
  /// root directory of the directory that is being scanned. It will check for
  /// entries under `dart_pre_commit` in the file.
  ///
  /// If a custom path is given, it is expected that this file directly
  /// contains the configuration as root level elements (without the
  /// `dart_pre_commit`).
  String? configFile,
}) = _HooksConfig;