style guide - pannous/warp GitHub Wiki
Style guide
Warp accepts many ways to write the same thing, but each has one preferred form (Normalization).
warp format writes the preferred layout for you (cli).
Layout
- tabs, one per nesting level
name: value, a parameter's type too:area(width: int, height: int)- every binary operator spaced:
x = a + b * 2 - one space after a comma, none before, none just inside
(…)and[…] - whole words, not abbreviations:
count, notcnt #comments://reads like Python's floor division (warp's is/!)
Commands
warp's command options are words, never --flags:
warp format check app.warp # not warp format --check app.warp