Skip to content

Commit 3f095f3

Browse files
authored
Merge pull request #37214 from bergerhoffer/adding-jq-guidance
2 parents c20d087 + 0d380ca commit 3f095f3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

contributing_to_docs/doc_guidelines.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,20 @@ spec:
934934
+
935935
Do not use `[...]`, `<snip>`, or any other variant.
936936

937+
* Do not use `jq` in commands (unless it is truly required), because this requires users to install the `jq` tool. Oftentimes, the same or similar result can be accomplished using `jsonpath` for `oc` commands.
938+
+
939+
For example, this command that uses `jq`:
940+
+
941+
----
942+
$ oc get clusterversion -o json|jq ".items[0].spec"
943+
----
944+
+
945+
can be updated to use `jsonpath` instead:
946+
+
947+
----
948+
$ oc get clusterversion -o jsonpath='{.items[0].spec}{"\n"}'
949+
----
950+
937951
=== Inline code or commands
938952
Do NOT show full commands or command syntax inline within a sentence. The next section covers how to show commands and command syntax.
939953

0 commit comments

Comments
 (0)