Hooks class

A callable class the runs the hooks on a repository.

This is the main entrypoint of the library. The class will scan your repository for staged files and run all activated hooks on them, reporting a result.

Constructors

Hooks({required FileResolver fileResolver, required ProgramRunner programRunner, required ConfigLoader configLoader, required TaskLoader taskLoader, required Logger logger, HooksConfig config = const HooksConfig()})
Constructs a new Hooks instance.
const

Properties

config HooksConfig
The configuration used by this instance.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call() Future<HookResult>
Executes all enabled hooks on the current repository.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited