From 4048f4921c2ec4a7113180d4aad9a07fb6f44524 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 9 Mar 2025 17:20:45 +0200 Subject: [PATCH] style-guide: simplify range placeholder (#15874) --- contributing-guides/style-guide.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contributing-guides/style-guide.md b/contributing-guides/style-guide.md index cf6b026297..70e0152e16 100644 --- a/contributing-guides/style-guide.md +++ b/contributing-guides/style-guide.md @@ -445,11 +445,6 @@ Keep the following guidelines in mind when choosing placeholders: - Use short but descriptive placeholders, such as `{{path/to/source_file}}` or `{{path/to/wallet.txt}}`. - Use [`snake_case`](https://wikipedia.org/wiki/snake_case) for multi-word placeholders. -- Use a generic placeholder rather than an actual value where a generic placeholder is available (but there is an exception to this listed below). For example, use -`iostat {{1..infinity}}` rather than `iostat {{2}}`. -- If there are several consecutive placeholders of the same type - which don't allow adding arbitrary text in them (ranges), then instead of generic placeholders use descriptive ones. For example prefer `input swipe {{x_position}} {{y_position}} {{x_position}} {{y_position}} {{seconds}}` - instead of `input swipe {{-infinity..infinity}} {{-infinity..infinity}} {{-infinity..infinity}} {{-infinity..infinity}} {{1..infinity}}`. #### Paths @@ -482,6 +477,7 @@ Keep the following guidelines in mind when choosing placeholders: - If a command can optionally take 1 or more arguments of the same kind, use an ellipsis: `{{placeholder1 placeholder2 ...}}`. For instance, if multiple paths are expected, use `{{path/to/directory1 path/to/directory2 ...}}`. - If only one of the multiple options is possible, write it as: `{{placeholder1|placeholder2|placeholder3}}`. If there are more than 4 possible values, you can use `|...` after the last item. +- Use two dots to mark a range of possible values, for example `{{1..5}}` or `{{a..z}}`. #### Optional placeholders