-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
TrailingCommaMultiLineRule not included by default #320
Comments
Hmm I guess this is where it was removed from the standard rules: Any plans for re-adding it? |
The rule wasn't working properly on 2.x version and I had to make some changes in 3.x #265 to fix the bugs.
But sure, I'm opened to adding back this rule. I didn't have time yet to try it on my personal work codebase. Does it work correctly for you (on a huge codebase ?) Can you do the PR to add it back ? :) |
I wouldn't say my codebase is huge but I tested it against 175+ files and didn't experience any issues with it, and it fixed all my trailing comma issues in multi-line arrays. But I'm not sure I have any examples of where the bug was produced previously... |
Rule(s) related to or rule(s) missing
TrailingCommaMultiLineRule
Expected behavior
The documentation states that
TrailingCommaMultiLineRule
is included by default, but it doesn't seem to be the case. If you look at \TwigCsFixer\Standard\TwigCsFixer it includes TrailingCommaSingleLineRule but not TrailingCommaMultiLineRule.Actual behavior
I had to add the .twig-cs-fixer.php file to get this working properly, otherwise this rule was not being applied.
The text was updated successfully, but these errors were encountered: