Skip to content

Commit 134578d

Browse files
authored
chore: Codify flag naming including sentinel values (#17569)
Starting with `SHOULD` while we feel this out some more. Might change to `MUST` once we build up more confidence. Signed-off-by: Jesse Szwedko <[email protected]> Signed-off-by: Jesse Szwedko <[email protected]>
1 parent 8823561 commit 134578d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/specs/configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ interpreted as described in [RFC 2119].
99
- [Introduction](#introduction)
1010
- [Scope](#scope)
1111
- [Terminology](#terminology)
12+
- [Flag](#flag)
1213
- [Entity](#entity)
1314
- [Option](#option)
1415
- [Schema](#schema)
1516
- [Naming](#naming)
17+
- [Flag naming](#flag-naming)
1618
- [Entity naming](#entity-naming)
1719
- [Option naming](#option-naming)
1820
- [Types](#types)
@@ -37,6 +39,10 @@ relevant specifications, such as the [component specification].
3739

3840
## Terminology
3941

42+
### Flag
43+
44+
"Flag" refers to a CLI flag provided when running Vector.
45+
4046
### Entity
4147

4248
"Entity" refers to a Vector concept used to model Vector's processing graph.
@@ -53,6 +59,16 @@ under entities and also used to define global Vector behavior.
5359

5460
### Naming
5561

62+
#### Flag naming
63+
64+
- MUST only contain ASCII alphanumeric, lowercase, and hyphens
65+
- MUST be in kebab-case format when multiple words are used (e.g., `config-dir`)
66+
- For flags that take a value, but are also able to be "disabled", they SHOULD NOT use a sentinel
67+
value. Instead they SHOULD have a second flag added prefixed with `no-` and SHOULD leave off any
68+
unit suffixes. For example, to disable `--graceful-shutdown-limit-secs`,
69+
a `--no-graceful-shutdown` flag was added. Vector MUST NOT allow both the flag and its negative to
70+
be specified at the same time.
71+
5672
#### Entity naming
5773

5874
- MUST only contain ASCII alphanumeric, lowercase, and underscores

0 commit comments

Comments
 (0)