A task that runs once for the whole repository.
For this task, all staged files are filtered based on canProcess and the list of filtered tasks is the passed to call. If no files do match, callForEmptyEntries defines the behavior.
Use this kind of task in case your task does something that affects the whole repository or uses multiple files at once, like checking for lints. If you only do things on a per file basis, without side effects or interaction between multiple files, you can use FileTask instead. The RepoTask is also very useful if you want to perform certain operations at the end of the hook, after all modifications.
Please note that tasks are executed in order, meaning if there are multiple tasks that can process a file, all tasks are called in order, each with all files that match the task. All RepoTasks are always run after any FileTask.
Constructors
- RepoTask()
Properties
- callForEmptyEntries → bool
-
Specifies, whether the task should still be executed, even if no files
match.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskName → String
-
Returns the user-visible name of the task.
no setterinherited
Methods
-
call(
Iterable< RepoEntry> entries) → Future<TaskResult> -
Executes the task on all given
entries
. -
canProcess(
RepoEntry entry) → bool -
Checks if a RepoEntry can be processed by this task.
inherited
-
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