From 634b285393145514f6fd5b3aafdc38ce28a28162 Mon Sep 17 00:00:00 2001 From: Matthias Gubler Date: Thu, 4 Nov 2021 14:51:04 +0100 Subject: [PATCH] Add entry for flag documentation (#4403) * Add entry for flag documentation fixes #4077 * Update docs/help/contributor/style-guide/documenting-code.md Co-authored-by: Samia Nneji Co-authored-by: Samia Nneji --- .../contributor/style-guide/documenting-code.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/help/contributor/style-guide/documenting-code.md b/docs/help/contributor/style-guide/documenting-code.md index 06ef4b5f3..5f54aa4bd 100644 --- a/docs/help/contributor/style-guide/documenting-code.md +++ b/docs/help/contributor/style-guide/documenting-code.md @@ -258,3 +258,16 @@ Apply code formatting only to special-purpose text: ``` ```` + + +## Documentation of flags +> Always use the short version of flags used in a command rather than the extended version. For example, use `-n` rather than `--namespace`. +=== ":white_check_mark: Correct" + ```bash + kubectl apply -f .yaml -n + ``` + +=== ":no_entry: Incorrect" + ```bash + kubectl apply --filename .yaml --namespace + ```