Skip to content

Some spacing style rules pending implementation #71

@jvsqzj

Description

@jvsqzj

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, const and in, except when a reserved word is used as an identifier (e.g., local uint8 *data;) - @alecalvop
  • SP.binop: spaces around binary operators except the dereferencing operators dot (a.b) and arrow (a->b) - @jvsqzj
  • SP.ternary: spaces around ? and : in the ternary ?: operator - @jvsqzj
  • SP.ptrdecl: space between a type and the * marking a pointer - @dtarassenko
  • NSP.ptrdecl: no space after the * marking a pointer in a declaration - @dtarassenko
  • SP.comment: spaces around the comment delimiters //, /* and **/ - @kevv87

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    LinterWork or bugs relating to the linting functionalityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions