-
Notifications
You must be signed in to change notification settings - Fork 30k
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
tools: enforce linebreak after ternary operators #10213
Conversation
This is to be consistent with the other operators and helps understanding the context when the code is grepped.
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.
LGTM. eslint doesn't enforce four space indent after a linebreak?
I'm not sure. The indent rule has a lot options, some of them being off by default. Maybe @not-an-aardvark can answer? |
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.
LGTM if CI is happy.
Correct, this is currently ignored by the |
I find this a lot less readable but it's only my personal preference, not a problem. |
I actually find this significantly harder to read... 😕 👎 |
I guess it's consistent with how we do |
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 966e5cf. |
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This is to be consistent with the other operators and helps understanding the context when the code is grepped. PR-URL: #10213 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This does not land cleanly in LTS. Added dont-land label. Please feel free to manually backport edit: if it does land it may need to come with #10421 on v6.x |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesDescription of change
This is to be consistent with the other operators and helps
understanding the context when the code is grepped.