FormatTask class tasks
A task the runs dart format
on the given file.
This task simply runs dart to format the staged file before committing it. The formatted file is immediately saved and staged again, if something had to be fixed. In that case, TaskResult.modified is returned.
- Implemented types
- Mixed in types
Constructors
- FormatTask({required ProgramRunner programRunner})
-
Default Constructor.
const
Properties
- filePattern → Pattern
-
The pattern that the RepoEntry.file is matched against.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- programRunner → ProgramRunner
-
The ProgramRunner instance used by this task.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskName → String
-
Returns the user-visible name of the task.
no setteroverride
Methods
-
call(
RepoEntry entry) → Future< TaskResult> -
Executes the task on the given
entry
.override -
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