Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pint needs multiple passes to find all fixes #346

Open
Ecsodikas opened this issue Feb 18, 2025 · 0 comments
Open

Pint needs multiple passes to find all fixes #346

Ecsodikas opened this issue Feb 18, 2025 · 0 comments

Comments

@Ecsodikas
Copy link

Pint Version

1.21

PHP Version

8.3.17

Description

We have a project with around 2500 php files.

When we run Laravel Pint on the project we get a lot of fixes which is nice. But if we run Laravel Pint afterwards with the exact same settings again, we get additional fixes. This happens for 2-3 times and then we finally reached a completely fixed codebase. We are using a custom config file

{
    "preset": "laravel",
    "rules": {
        "array_push": true,
        "concat_space": {
            "spacing": "one"
        },
        "fully_qualified_strict_types": true,
        "new_with_parentheses": true,
        "method_argument_space": {
            "attribute_placement": "standalone"
        },
        "not_operator_with_successor_space": false,
        "no_empty_comment": true,
        "no_unneeded_import_alias": true,
        "operator_linebreak": true,
        "phpdoc_param_order": true
    }
}

It's quite hard to pin down what the actual problem is because it is so random if it needs 1, 2 or 3 passes to finally finish. If someone else experienced the same problem it would be nice to gather as much information as possible on the problem.

Steps To Reproduce

  1. Have a project with around 2500 files
  2. Run ./vendor/bin/pint --config=pint.json
  3. Observe many changes
  4. Run ./vendor/bin/pint --config=pint.json
  5. Observe fewer changes
  6. Repeat until you observe no changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants