Some spacing style rules pending implementation
jvsqzj opened this issue · 0 comments
jvsqzj commented
This issue aims to complete the spacing rules implementation.
Documenting implemented and pending spacing rules as detailed in the DML style guide here.
Pending rules:
- SP.reserved: spaces around reserved words, such as
if,else,default,size,constandin, except when a reserved word is used as an identifier (e.g.,local uint8 *data;) - SP.binop: spaces around binary operators except the dereferencing operators dot (
a.b) and arrow (a->b) - SP.ternary: spaces around
?and:in the ternary?:operator - SP.ptrdecl: space between a type and the
*marking a pointer - SP.comment: spaces around the comment delimiters
//,/*and**/ - NSP.ptrdecl: no space after the
*marking a pointer in a declaration
Implemented rules:
- SP.braces: spaces around braces (
{and}) - SP.punct: spaces after but not before colon, semicolon and comma
- NSP.funpar: no spaces between a function/method name and its opening parenthesis
- NSP.inparen: no spaces immediately inside parentheses or brackets
- NSP.unary: no spaces between a unary operator and its operand
- NSP.TrailingWhitespace: no spaces between the last token in a line and the corresponding newline
\n