phpro / grumphp

A PHP code-quality tool
MIT License
4.15k stars 431 forks source link

Add 'blocking' flag to a Task in the TaskRunner #17

Closed veewee closed 8 years ago

veewee commented 9 years ago

In a Task service it must be possible to add a "blocking" tag to the service configuration. E.g.:

parameters:
    tasks:
        taskname:
            metadata:
                blocking: false

By default all tasks are blocking. A user can overwrite the task service to be non blocking. When a task is blocking, the errors will be fatal and shown in red. When a task is not blocking, the error will not be fatal. A yellow error message will be displayed, but the changes will be commited.

The blocking flag of a task should be read when a tasks fails. The metadata functionallity is already available with the getTaskMetadata() method on the GrumPHP object.

More information: https://github.com/phpro/grumphp/blob/master/doc/tasks.md#metadata

aderuwe commented 8 years ago

Shouldn't we plan to support this option in grumphp.yml?

veewee commented 8 years ago

@aderuwe: I changed the description based on one of the previous commits.

aderuwe commented 8 years ago

Yup, perfect and what I expected, thanks!