Software /
code /
prosody
Comparison
doc/coding_style.md @ 9900:f2104b36f673
doc/coding_style: The codebase uses semicolons
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Mar 2019 04:00:55 +0100 |
parent | 9899:8c831c76fc94 |
child | 9939:3a7f822f6edd |
comparison
equal
deleted
inserted
replaced
9899:8c831c76fc94 | 9900:f2104b36f673 |
---|---|
449 do_other_complicated_function() | 449 do_other_complicated_function() |
450 return false | 450 return false |
451 end | 451 end |
452 ``` | 452 ``` |
453 | 453 |
454 * Separate statements onto multiple lines. Do not use semicolons as statement terminators. | 454 * Separate statements onto multiple lines. Use semicolons as statement terminators. |
455 | 455 |
456 ```lua | 456 ```lua |
457 -- bad | 457 -- bad |
458 local whatever = "sure" | |
459 a = 1 b = 2 | |
460 | |
461 -- good | |
458 local whatever = "sure"; | 462 local whatever = "sure"; |
459 a = 1; b = 2 | 463 a = 1; |
460 | 464 b = 2; |
461 -- good | |
462 local whatever = "sure" | |
463 a = 1 | |
464 b = 2 | |
465 ``` | 465 ``` |
466 | 466 |
467 ## Spacing | 467 ## Spacing |
468 | 468 |
469 * Use a space after `--`. | 469 * Use a space after `--`. |