mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add the check for suffix of option in each line of help, to make sure no extra space in it
Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
This commit is contained in:
parent
558c3b09db
commit
f63a29ddee
1 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,11 @@ func TestHelpTextVerify(t *testing.T) {
|
|||
if strings.HasPrefix(line, " -") && strings.HasSuffix(line, ".") {
|
||||
t.Fatalf("Help for %q should not end with a period: %s", cmd, line)
|
||||
}
|
||||
|
||||
// Options should not end with a space
|
||||
if strings.HasSuffix(line, " ") {
|
||||
t.Fatalf("Help for %q should not end with a space: %s", cmd, line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue