Skip to content

Commit 0a134c9

Browse files
robxsbarzowski
authored andcommitted
Modify golden for reformatted golang tool help
1 parent 2da3e70 commit 0a134c9

4 files changed

+140
-106
lines changed

test_cmd/fmt_help.golden.stdout.golang

+26-20
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,31 @@ Jsonnet reformatter v0.16.0
33
jsonnetfmt {<option>} { <filename> }
44

55
Available options:
6-
-h / --help This message
7-
-e / --exec Treat filename as code
8-
-o / --output-file <file> Write to the output file rather than stdout
9-
-c / --create-output-dirs Automatically creates all parent directories for files
10-
-i / --in-place Update the Jsonnet file(s) in place.
11-
--test Exit with failure if reformatting changed the file(s).
12-
-n / --indent <n> Number of spaces to indent by (default 2, 0 means no change)
13-
--max-blank-lines <n> Max vertical spacing, 0 means no change (default 2)
14-
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
15-
--comment-style <h|s|l> # (h), // (s)(default), or 'leave'; never changes she-bang
16-
--[no-]pretty-field-names Use syntax sugar for fields and indexing (on by default)
17-
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
18-
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2} (on by default)
19-
--[no-]sort-imports Sorting of imports (on by default)
20-
--version Print version
6+
-h / --help This message
7+
-e / --exec Treat filename as code
8+
-o / --output-file <file> Write to the output file rather than stdout
9+
-c / --create-output-dirs Automatically creates all parent directories for
10+
files
11+
-i / --in-place Update the Jsonnet file(s) in place
12+
--test Exit with failure if reformatting changed the
13+
file(s)
14+
-n / --indent <n> Number of spaces to indent by
15+
(default 2, 0 means no change)
16+
--max-blank-lines <n> Max vertical spacing (default 2, 0 means no change)
17+
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
18+
--comment-style <h|s|l> # (h), // (s) (default), or 'leave'; never changes
19+
she-bang
20+
--[no-]pretty-field-names Use syntax sugar for fields and indexing
21+
(on by default)
22+
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
23+
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2}
24+
(on by default)
25+
--[no-]sort-imports Sorting of imports (on by default)
26+
--version Print version
2127

2228
In all cases:
23-
<filename> can be - (stdin)
24-
Multichar options are expanded e.g. -abc becomes -a -b -c.
25-
The -- option suppresses option processing for subsequent arguments.
26-
Note that since filenames and jsonnet programs can begin with -, it is advised to
27-
use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".
29+
<filename> can be - (stdin)
30+
Multichar options are expanded e.g. -abc becomes -a -b -c.
31+
The -- option suppresses option processing for subsequent arguments.
32+
Note that since filenames and jsonnet programs can begin with -, it is
33+
advised to use -- if the argument is unknown, e.g. jsonnetfmt -- "$FILENAME".

test_cmd/fmt_no_args.golden.stderr.golang

+26-20
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,31 @@ Jsonnet reformatter v0.16.0
55
jsonnetfmt {<option>} { <filename> }
66

77
Available options:
8-
-h / --help This message
9-
-e / --exec Treat filename as code
10-
-o / --output-file <file> Write to the output file rather than stdout
11-
-c / --create-output-dirs Automatically creates all parent directories for files
12-
-i / --in-place Update the Jsonnet file(s) in place.
13-
--test Exit with failure if reformatting changed the file(s).
14-
-n / --indent <n> Number of spaces to indent by (default 2, 0 means no change)
15-
--max-blank-lines <n> Max vertical spacing, 0 means no change (default 2)
16-
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
17-
--comment-style <h|s|l> # (h), // (s)(default), or 'leave'; never changes she-bang
18-
--[no-]pretty-field-names Use syntax sugar for fields and indexing (on by default)
19-
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
20-
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2} (on by default)
21-
--[no-]sort-imports Sorting of imports (on by default)
22-
--version Print version
8+
-h / --help This message
9+
-e / --exec Treat filename as code
10+
-o / --output-file <file> Write to the output file rather than stdout
11+
-c / --create-output-dirs Automatically creates all parent directories for
12+
files
13+
-i / --in-place Update the Jsonnet file(s) in place
14+
--test Exit with failure if reformatting changed the
15+
file(s)
16+
-n / --indent <n> Number of spaces to indent by
17+
(default 2, 0 means no change)
18+
--max-blank-lines <n> Max vertical spacing (default 2, 0 means no change)
19+
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
20+
--comment-style <h|s|l> # (h), // (s) (default), or 'leave'; never changes
21+
she-bang
22+
--[no-]pretty-field-names Use syntax sugar for fields and indexing
23+
(on by default)
24+
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
25+
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2}
26+
(on by default)
27+
--[no-]sort-imports Sorting of imports (on by default)
28+
--version Print version
2329

2430
In all cases:
25-
<filename> can be - (stdin)
26-
Multichar options are expanded e.g. -abc becomes -a -b -c.
27-
The -- option suppresses option processing for subsequent arguments.
28-
Note that since filenames and jsonnet programs can begin with -, it is advised to
29-
use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".
31+
<filename> can be - (stdin)
32+
Multichar options are expanded e.g. -abc becomes -a -b -c.
33+
The -- option suppresses option processing for subsequent arguments.
34+
Note that since filenames and jsonnet programs can begin with -, it is
35+
advised to use -- if the argument is unknown, e.g. jsonnetfmt -- "$FILENAME".

test_cmd/help.golden.stdout.golang

+44-33
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,52 @@ Jsonnet commandline interpreter v0.16.0
33
jsonnet {<option>} <filename>
44

55
Available options:
6-
-h / --help This message
7-
-e / --exec Treat filename as code
8-
-J / --jpath <dir> Specify an additional library search dir (right-most wins)
9-
-o / --output-file <file> Write to the output file rather than stdout
10-
-m / --multi <dir> Write multiple files to the directory, list files on stdout
11-
-c / --create-output-dirs Automatically creates all parent directories for files
12-
-y / --yaml-stream Write output as a YAML stream of JSON documents
13-
-S / --string Expect a string, manifest as plain text
14-
-s / --max-stack <n> Number of allowed stack frames
15-
-t / --max-trace <n> Max length of stack trace before cropping
16-
--version Print version
6+
-h / --help This message
7+
-e / --exec Treat filename as code
8+
-J / --jpath <dir> Specify an additional library search dir
9+
(right-most wins)
10+
-o / --output-file <file> Write to the output file rather than stdout
11+
-m / --multi <dir> Write multiple files to the directory, list files
12+
on stdout
13+
-c / --create-output-dirs Automatically creates all parent directories for
14+
files
15+
-y / --yaml-stream Write output as a YAML stream of JSON documents
16+
-S / --string Expect a string, manifest as plain text
17+
-s / --max-stack <n> Number of allowed stack frames
18+
-t / --max-trace <n> Max length of stack trace before cropping
19+
--version Print version
20+
1721
Available options for specifying values of 'external' variables:
18-
Provide the value as a string:
19-
-V / --ext-str <var>[=<val>] If <val> is omitted, get from environment var <var>
20-
--ext-str-file <var>=<file> Read the string from the file
21-
Provide a value as Jsonnet code:
22-
--ext-code <var>[=<code>] If <code> is omitted, get from environment var <var>
23-
--ext-code-file <var>=<file> Read the code from the file
22+
Provide the value as a string:
23+
-V / --ext-str <var>[=<val>] If <val> is omitted, get from environment
24+
var <var>
25+
--ext-str-file <var>=<file> Read the string from the file
26+
Provide a value as Jsonnet code:
27+
--ext-code <var>[=<code>] If <code> is omitted, get from environment
28+
var <var>
29+
--ext-code-file <var>=<file> Read the code from the file
30+
2431
Available options for specifying values of 'top-level arguments':
25-
Provide the value as a string:
26-
-A / --tla-str <var>[=<val>] If <val> is omitted, get from environment var <var>
27-
--tla-str-file <var>=<file> Read the string from the file
28-
Provide a value as Jsonnet code:
29-
--tla-code <var>[=<code>] If <code> is omitted, get from environment var <var>
30-
--tla-code-file <var>=<file> Read the code from the file
32+
Provide the value as a string:
33+
-A / --tla-str <var>[=<val>] If <val> is omitted, get from environment
34+
var <var>
35+
--tla-str-file <var>=<file> Read the string from the file
36+
Provide a value as Jsonnet code:
37+
--tla-code <var>[=<code>] If <code> is omitted, get from environment
38+
var <var>
39+
--tla-code-file <var>=<file> Read the code from the file
40+
3141
Environment variables:
32-
JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added
33-
in reverse order before the paths specified by --jpath (i.e. left-most wins)
34-
E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:
35-
JSONNET_PATH=d:c:a:b jsonnet
36-
jsonnet -J b -J a -J c -J d
42+
JSONNET_PATH is a colon (semicolon on Windows) separated list of directories
43+
added in reverse order before the paths specified by --jpath (i.e. left-most
44+
wins). E.g. these are equivalent:
45+
JSONNET_PATH=a:b jsonnet -J c -J d
46+
JSONNET_PATH=d:c:a:b jsonnet
47+
jsonnet -J b -J a -J c -J d
3748

3849
In all cases:
39-
<filename> can be - (stdin)
40-
Multichar options are expanded e.g. -abc becomes -a -b -c.
41-
The -- option suppresses option processing for subsequent arguments.
42-
Note that since filenames and jsonnet programs can begin with -, it is advised to
43-
use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".
50+
<filename> can be - (stdin)
51+
Multichar options are expanded e.g. -abc becomes -a -b -c.
52+
The -- option suppresses option processing for subsequent arguments.
53+
Note that since filenames and jsonnet programs can begin with -, it is
54+
advised to use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".

test_cmd/no_args.golden.stderr.golang

+44-33
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,52 @@ Jsonnet commandline interpreter v0.16.0
55
jsonnet {<option>} <filename>
66

77
Available options:
8-
-h / --help This message
9-
-e / --exec Treat filename as code
10-
-J / --jpath <dir> Specify an additional library search dir (right-most wins)
11-
-o / --output-file <file> Write to the output file rather than stdout
12-
-m / --multi <dir> Write multiple files to the directory, list files on stdout
13-
-c / --create-output-dirs Automatically creates all parent directories for files
14-
-y / --yaml-stream Write output as a YAML stream of JSON documents
15-
-S / --string Expect a string, manifest as plain text
16-
-s / --max-stack <n> Number of allowed stack frames
17-
-t / --max-trace <n> Max length of stack trace before cropping
18-
--version Print version
8+
-h / --help This message
9+
-e / --exec Treat filename as code
10+
-J / --jpath <dir> Specify an additional library search dir
11+
(right-most wins)
12+
-o / --output-file <file> Write to the output file rather than stdout
13+
-m / --multi <dir> Write multiple files to the directory, list files
14+
on stdout
15+
-c / --create-output-dirs Automatically creates all parent directories for
16+
files
17+
-y / --yaml-stream Write output as a YAML stream of JSON documents
18+
-S / --string Expect a string, manifest as plain text
19+
-s / --max-stack <n> Number of allowed stack frames
20+
-t / --max-trace <n> Max length of stack trace before cropping
21+
--version Print version
22+
1923
Available options for specifying values of 'external' variables:
20-
Provide the value as a string:
21-
-V / --ext-str <var>[=<val>] If <val> is omitted, get from environment var <var>
22-
--ext-str-file <var>=<file> Read the string from the file
23-
Provide a value as Jsonnet code:
24-
--ext-code <var>[=<code>] If <code> is omitted, get from environment var <var>
25-
--ext-code-file <var>=<file> Read the code from the file
24+
Provide the value as a string:
25+
-V / --ext-str <var>[=<val>] If <val> is omitted, get from environment
26+
var <var>
27+
--ext-str-file <var>=<file> Read the string from the file
28+
Provide a value as Jsonnet code:
29+
--ext-code <var>[=<code>] If <code> is omitted, get from environment
30+
var <var>
31+
--ext-code-file <var>=<file> Read the code from the file
32+
2633
Available options for specifying values of 'top-level arguments':
27-
Provide the value as a string:
28-
-A / --tla-str <var>[=<val>] If <val> is omitted, get from environment var <var>
29-
--tla-str-file <var>=<file> Read the string from the file
30-
Provide a value as Jsonnet code:
31-
--tla-code <var>[=<code>] If <code> is omitted, get from environment var <var>
32-
--tla-code-file <var>=<file> Read the code from the file
34+
Provide the value as a string:
35+
-A / --tla-str <var>[=<val>] If <val> is omitted, get from environment
36+
var <var>
37+
--tla-str-file <var>=<file> Read the string from the file
38+
Provide a value as Jsonnet code:
39+
--tla-code <var>[=<code>] If <code> is omitted, get from environment
40+
var <var>
41+
--tla-code-file <var>=<file> Read the code from the file
42+
3343
Environment variables:
34-
JSONNET_PATH is a colon (semicolon on Windows) separated list of directories added
35-
in reverse order before the paths specified by --jpath (i.e. left-most wins)
36-
E.g. JSONNET_PATH=a:b jsonnet -J c -J d is equivalent to:
37-
JSONNET_PATH=d:c:a:b jsonnet
38-
jsonnet -J b -J a -J c -J d
44+
JSONNET_PATH is a colon (semicolon on Windows) separated list of directories
45+
added in reverse order before the paths specified by --jpath (i.e. left-most
46+
wins). E.g. these are equivalent:
47+
JSONNET_PATH=a:b jsonnet -J c -J d
48+
JSONNET_PATH=d:c:a:b jsonnet
49+
jsonnet -J b -J a -J c -J d
3950

4051
In all cases:
41-
<filename> can be - (stdin)
42-
Multichar options are expanded e.g. -abc becomes -a -b -c.
43-
The -- option suppresses option processing for subsequent arguments.
44-
Note that since filenames and jsonnet programs can begin with -, it is advised to
45-
use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".
52+
<filename> can be - (stdin)
53+
Multichar options are expanded e.g. -abc becomes -a -b -c.
54+
The -- option suppresses option processing for subsequent arguments.
55+
Note that since filenames and jsonnet programs can begin with -, it is
56+
advised to use -- if the argument is unknown, e.g. jsonnet -- "$FILENAME".

0 commit comments

Comments
 (0)