Skip to content

Commit ee43860

Browse files
jmooringbep
authored andcommitted
commands: Use punctuation consistently in short description
1 parent fd8b0fb commit ee43860

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

commands/gen.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ url: %s
149149

150150
return &simpleCommand{
151151
name: "doc",
152-
short: "Generate Markdown documentation for the Hugo CLI.",
152+
short: "Generate Markdown documentation for the Hugo CLI",
153153
long: `Generate Markdown documentation for the Hugo CLI.
154154
This command is, mostly, used to create up-to-date documentation
155155
of Hugo's command-line interface for https://gohugo.io/.
@@ -201,7 +201,7 @@ url: %s
201201
newDocsHelper := func() simplecobra.Commander {
202202
return &simpleCommand{
203203
name: "docshelper",
204-
short: "Generate some data files for the Hugo docs.",
204+
short: "Generate some data files for the Hugo docs",
205205

206206
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
207207
r.Println("Generate docs data to", docsHelperTarget)

commands/mod.go

+14-14
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ func newModCommands() *modCommands {
4444

4545
npmCommand := &simpleCommand{
4646
name: "npm",
47-
short: "Various npm helpers.",
47+
short: "Various npm helpers",
4848
long: `Various npm (Node package manager) helpers.`,
4949
commands: []simplecobra.Commander{
5050
&simpleCommand{
5151
name: "pack",
52-
short: "Experimental: Prepares and writes a composite package.json file for your project.",
52+
short: "Experimental: Prepares and writes a composite package.json file for your project",
5353
long: `Prepares and writes a composite package.json file for your project.
5454
5555
On first run it creates a "package.hugo.json" in the project root if not already there. This file will be used as a template file
56-
with the base dependency set.
56+
with the base dependency set.
5757
5858
This set will be merged with all "package.hugo.json" files found in the dependency tree, picking the version closest to the project.
5959
@@ -80,12 +80,12 @@ so this may/will change in future versions of Hugo.
8080
commands: []simplecobra.Commander{
8181
&simpleCommand{
8282
name: "init",
83-
short: "Initialize this project as a Hugo Module.",
83+
short: "Initialize this project as a Hugo Module",
8484
long: `Initialize this project as a Hugo Module.
8585
It will try to guess the module path, but you may help by passing it as an argument, e.g:
86-
86+
8787
hugo mod init github.com/gohugoio/testshortcodes
88-
88+
8989
Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module
9090
inside a subfolder on GitHub, as one example.
9191
`,
@@ -111,7 +111,7 @@ so this may/will change in future versions of Hugo.
111111
},
112112
&simpleCommand{
113113
name: "verify",
114-
short: "Verify dependencies.",
114+
short: "Verify dependencies",
115115
long: `Verify checks that the dependencies of the current module, which are stored in a local downloaded source cache, have not been modified since being downloaded.`,
116116
withc: func(cmd *cobra.Command, r *rootCommand) {
117117
cmd.ValidArgsFunction = cobra.NoFileCompletions
@@ -129,7 +129,7 @@ so this may/will change in future versions of Hugo.
129129
},
130130
&simpleCommand{
131131
name: "graph",
132-
short: "Print a module dependency graph.",
132+
short: "Print a module dependency graph",
133133
long: `Print a module dependency graph with information about module status (disabled, vendored).
134134
Note that for vendored modules, that is the version listed and not the one from go.mod.
135135
`,
@@ -149,7 +149,7 @@ Note that for vendored modules, that is the version listed and not the one from
149149
},
150150
&simpleCommand{
151151
name: "clean",
152-
short: "Delete the Hugo Module cache for the current project.",
152+
short: "Delete the Hugo Module cache for the current project",
153153
long: `Delete the Hugo Module cache for the current project.`,
154154
withc: func(cmd *cobra.Command, r *rootCommand) {
155155
cmd.ValidArgsFunction = cobra.NoFileCompletions
@@ -175,7 +175,7 @@ Note that for vendored modules, that is the version listed and not the one from
175175
},
176176
&simpleCommand{
177177
name: "tidy",
178-
short: "Remove unused entries in go.mod and go.sum.",
178+
short: "Remove unused entries in go.mod and go.sum",
179179
withc: func(cmd *cobra.Command, r *rootCommand) {
180180
cmd.ValidArgsFunction = cobra.NoFileCompletions
181181
applyLocalFlagsBuildConfig(cmd, r)
@@ -190,7 +190,7 @@ Note that for vendored modules, that is the version listed and not the one from
190190
},
191191
&simpleCommand{
192192
name: "vendor",
193-
short: "Vendor all module dependencies into the _vendor directory.",
193+
short: "Vendor all module dependencies into the _vendor directory",
194194
long: `Vendor all module dependencies into the _vendor directory.
195195
If a module is vendored, that is where Hugo will look for it's dependencies.
196196
`,
@@ -209,16 +209,16 @@ Note that for vendored modules, that is the version listed and not the one from
209209

210210
&simpleCommand{
211211
name: "get",
212-
short: "Resolves dependencies in your current Hugo Project.",
212+
short: "Resolves dependencies in your current Hugo project",
213213
long: `
214-
Resolves dependencies in your current Hugo Project.
214+
Resolves dependencies in your current Hugo project.
215215
216216
Some examples:
217217
218218
Install the latest version possible for a given module:
219219
220220
hugo mod get github.com/gohugoio/testshortcodes
221-
221+
222222
Install a specific version:
223223
224224
hugo mod get github.com/gohugoio/testshortcodes@v0.3.0

commands/release.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func newReleaseCommand() simplecobra.Commander {
3232

3333
return &simpleCommand{
3434
name: "release",
35-
short: "Release a new version of Hugo.",
35+
short: "Release a new version of Hugo",
3636
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
3737
rel, err := releaser.New(skipPush, try, step)
3838
if err != nil {

commands/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func newServerCommand() *serverCommand {
119119
commands: []simplecobra.Commander{
120120
&simpleCommand{
121121
name: "trust",
122-
short: "Install the local CA in the system trust store.",
122+
short: "Install the local CA in the system trust store",
123123
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
124124
action := "-install"
125125
if uninstall {

testscripts/commands/hugo__errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# The hugo mod get command handles flags a little special, but the -h flag should print the help.
44
hugo mod get -h
5-
stdout 'Resolves dependencies in your current Hugo Project'
5+
stdout 'Resolves dependencies in your current Hugo project'
66

77
# Invalid flag. Should print an error message to stderr and the help to stdout.
88
! hugo --asdf
@@ -15,4 +15,4 @@ stdout 'hugo is the main command'
1515
stderr 'failed to load config'
1616

1717
-- hugo.toml --
18-
invalid: toml
18+
invalid: toml

0 commit comments

Comments
 (0)