Skip to content

Commit a395b45

Browse files
authored
Stop sorting CLI options (#188)
* Stop sorting CLI options https://github.com/urfave/cli/releases/tag/v2.19.2 * Update to latest `urfave/cli/v2` Less bugs, more features $ go get -u github.com/urfave/cli/v2 go: upgraded github.com/urfave/cli/v2 v2.19.3 => v2.25.7 * Update docs/CLI.md and fix tests
1 parent 94fdc92 commit a395b45

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

cmd/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestCLIReferenceInSync(t *testing.T) {
4545
require.Nil(t, err)
4646
help := strings.TrimSpace(string(helpBytes))
4747
require.Truef(t, strings.Contains(readme, help),
48-
"Readme.md missing help text %s for %s.\nRun `%s` and paste the output in the Readme.",
48+
"docs/CLI.md missing help text %s for %s.\nRun `%s` and paste the output in the Readme.",
4949
help, commandName, strings.Join(append([]string{"scip"}, args...), " "))
5050
}
5151

docs/CLI.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ COMMANDS:
3434
help, h Shows a list of commands or help for one command
3535
3636
GLOBAL OPTIONS:
37-
--help, -h show help (default: false)
38-
--version, -v print the version (default: false)
39-
37+
--help, -h show help
38+
--version, -v print the version
4039
```
4140

4241
## `scip convert`
@@ -69,9 +68,6 @@ DESCRIPTION:
6968
7069
You may want to filter the output using `grep -v <pattern>`
7170
to narrow down on certain classes of errors.
72-
73-
OPTIONS:
74-
--help, -h show help (default: false)
7571
```
7672

7773
## `scip print`
@@ -88,7 +84,6 @@ DESCRIPTION:
8884
Do not rely on the output of this command in scripts
8985
9086
OPTIONS:
91-
--help, -h show help (default: false)
9287
--json Output in JSON format (default: false)
9388
```
9489

@@ -108,12 +103,11 @@ DESCRIPTION:
108103
and symbol information.
109104
110105
OPTIONS:
111-
--comment-syntax value Comment syntax to use for snapshot files (default: "//")
112106
--from value Path to SCIP index file (default: "index.scip")
113-
--help, -h show help (default: false)
107+
--to value Path to output directory for snapshot files (default: "scip-snapshot")
114108
--project-root value Override project root in the SCIP file. For example, this can be helpful when the SCIP index was created inside a Docker image or created on another computer
115109
--strict If true, fail fast on errors (default: true)
116-
--to value Path to output directory for snapshot files (default: "scip-snapshot")
110+
--comment-syntax value Comment syntax to use for snapshot files (default: "//")
117111
```
118112

119113
## `scip stats`

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ require (
1313
github.com/smacker/go-tree-sitter v0.0.0-20220209044044-0d3022e933c3
1414
github.com/sourcegraph/sourcegraph/lib v0.0.0-20220511160847-5a43d3ea24eb
1515
github.com/stretchr/testify v1.7.1
16-
github.com/urfave/cli/v2 v2.19.1
16+
github.com/urfave/cli/v2 v2.25.7
1717
golang.org/x/tools v0.1.10
1818
google.golang.org/protobuf v1.28.0
1919
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr
326326
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
327327
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
328328
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
329-
github.com/urfave/cli/v2 v2.19.1 h1:5Lt6gp6VugLvDmsyl80uqZlmCn/gyI9af8JvC2voqCI=
330-
github.com/urfave/cli/v2 v2.19.1/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI=
329+
github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=
330+
github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
331331
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
332332
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
333333
github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=

0 commit comments

Comments
 (0)