Skip to content

Commit 972a950

Browse files
committed
Update API_GUIDELINES
Added rule about formatting explicit Int values.
1 parent a04701f commit 972a950

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

API_GUIDELINES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,7 @@ _TBD..._
455455
```
456456
- If there’s a `return` statement in the `do-catch` block, or if the query method is in there, the request and response methods should be beside each other.
457457
- If any additional method calls are being made, put them beside `createRequest()` and `sendRequest()` if they're strongly related to them.
458+
- When explicitly writing `Int` values in Swift, if the value is 1,000 or greater, use underscore separators (`_`) every three digits, grouping from right to left, to help with making it easier to read. Examples:
459+
- `2_000`
460+
- `14_923`
461+
- `1_038_124`

0 commit comments

Comments
 (0)