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. Check the documentation of FixImportsTask, FormatTask, AnalyzeTask and PullUpDependenciesTask for more details on the actual supported hook operations. Check the Tasks category for a list of all tasks.

For an easier use of this class and the standard hook tasks, see HooksProvider.

Constructors

Hooks({required Logger logger, required FileResolver fileResolver, required ProgramRunner programRunner, required List<TaskBase> tasks, bool continueOnRejected = false})
Constructs a new Hooks instance.
const

Properties

continueOnRejected bool
Specifies, whether processing should continue on rejections.
final
hashCode int
The hash code for this object.
no setterinherited
logger Logger
The Logger instance used to log progress and errors
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tasks Iterable<String>
Returns all tasks this hook will run on the repository upon call().
no setter

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