-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Indentation in hash parameters #243
Comments
Hi, do you want to try working on a rule ? |
Yes, of course! I would like to! How can I do that? |
You can play with https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/tests/Token/Tokenizer/TokenizerTest.php For example
Notice that in case of the token Twig-CS-Fixer/src/Rules/Operator/OperatorSpacingRule.php Lines 35 to 37 in 1f1bcc5
You rule will need to be configurable to know what should be used for indent (tab or space ? And how many space ?) an example can be found here https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/src/Rules/Whitespace/IndentRule.php#L14 Here you have an example of rule which works on
But the issue you'll encounter will be
because people might expect it to be fixed to
My fear is the fact that putting one step in the indentation rule will end with having to indenting everything ( |
@lukepass Just wanted to say that I'm also very much interested in having this properly formatted. So thanks in advance for your work on this 🙌 💪 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Expected behavior
I wish that hash arguments were indented when on multiple lines. For example:
From:
To:
Actual behavior
Hash indentation is not changed.
The text was updated successfully, but these errors were encountered: