-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Add statement_indentation
config not_for_comments
#7963
base: master
Are you sure you want to change the base?
feat: Add statement_indentation
config not_for_comments
#7963
Conversation
statement_indentation
config not_for_comments
statement_indentation
config not_for_comments
I would prefer option to "allow_zero_indented_comments" to keep comments with zero indentation, but align every other comments with non-zero indentation. |
I agree. And that's also how I use it, but not how I made it. I'll give that a shot. I'm not sure I understand the |
@@ -7,6 +7,15 @@ Each statement must be indented. | |||
Configuration | |||
------------- | |||
|
|||
``not_for_comments`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``not_for_comments`` | |
``skip_single_line_comments`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like allow_zero_indented_comments
better, because that's what it does. I have the occasional two lines of // \PHPStan\dumpType()
at line start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. Make sure it is only for single line comments starting with //
.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This looks like a very specific edge case, I'm not sure we want to support it natively. Is this part of some widespread code style? |
No widespread code style as far as I know. |
New option to completely ignore
//
commented lines. I like my temporary comments to be very explicit, not neatly indented with the rest of the code. Real comments, I'll correctly indent myself, these temp comments, I'll put at the start of the line, or maybe more indented than the rest, whatever stands out.E.g., while playing with phpstan: