style-guide: add Range syntax (#9646)

* style-guide: standardize range syntax

* Simplify syntax for arbitraty integer placeholders

* Describe syntax for arbitraty floats
pull/3/head
Emily Grace Seville 2023-01-03 13:44:04 +10:00 committed by GitHub
parent 1b05651161
commit 2190f4031f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -109,6 +109,17 @@ Example:
- Use GNU-style **long options** (like `--help` rather than `-h`) when they are cross-platform compatible (intended to work the same across multiple platforms).
- In other cases use short options (like `-h`).
## Range syntax
All borders of integer and float ranges are included. If you wanna exclude
one border then use incremented or decremented values to do it:
`{{1..5}}` == `[1-6)`.
- Use `{{from..to}}` syntax for closed ranges.
- Use `{{-infinity..to}}` or `{{from..infinity}}` syntax for integer partially closed ranges.
- Use `{{integer}}` syntax for values where any integer is valid.
- Use `{{float}}` syntax for values where any float is valid.
## Placeholder syntax
User-provided values should use the `{{placeholder}}` syntax