Skip to content

Style: enforce curlies around control flow structures;

Benjamin Bouvier requested to merge style-if into master

Since we now have prettier which puts if statements without curlies on a single-liner, which I find particularly ugly and hard to read, I now propose that we use curlies even if the control flow statement fits on one line. It makes the code easier to modify (and reviews easier), it prevents a full range of issues (when forgetting about adding curlies after adding new statements), and it's just plain beautiful.

Any objections?

Merge request reports