Skip to content

Custom error hook #24

Closed
Closed
@arxeiss

Description

@arxeiss

Thank you for keeping this tool alive, it is amazing! But I would like to propose a custom error hook or some callback which I can use to modify error before proceeding. This is the reason

Laravel & Blade

Laravel FW uses Blade as a template, which is then compiled into PHP files. So I'm running this code

php artisan view:cache # Compile all Blade templates
./vendor/bin/parallel-lint ./storage/framework/views

But if there is an error in Blade template, it shows error like this:
Parse error: ./storage/framework/views/b89d10e4ca8386fb9f234e0b5a62798e71014114.php:66 Which says nothing, because it points into already compiled. However, there is a way how to map this error back into the original Blade file.

So if there would be some possible callbacks, I would use it to modify error back to the original file and line.


Is there a way how to make this possible? It would maybe require some config file instead of CLI arguments only. If you don't want to require any other package for config parsing (like Yaml etc), maybe just include PHP file with an array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions