laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.

Home Page:https://laravel.com/docs/pint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pint not show Error message when pint.json is not a valid json file

ClaudioEyzaguirre opened this issue · comments

  • Pint Version: 1.0.0
  • PHP Version: 8.1.7

Description:

If you try to run Pint with an invalid pint.json file, Pint ignore your custom file and run using the default preset rules.

It would be great if Pint could show an error so the developer can fix the error.

Steps To Reproduce:

Add a pint.json with the following content (Note trailing comma in Line 5):

{
    "preset": "laravel",
    "rules": {
        "concat_space": {
            "spacing": "one",
        }
    }
}

Add this lines to some php file (e.g: AppServiceProvider):

$user = 'John';
$contact_space = 'Hi' . ' ' . $user;

Run Pint:

./vendor/bin/pint