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 immediatly saved and staged again, if something had to be fixed. In that case, TaskResult.modified is returned.
Constructors
- FormatTask.new({required ProgramRunner programRunner})
-
Default Constructor.
const
Properties
- filePattern → Pattern
-
Returns a pattern to check if a RepoEntry can be processed by this task.
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 -
Available on TaskBase, provided by the TaskBaseX extension
Check if this task can process the givenentry
. -
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