Skip to content

Commit 33a1b5c

Browse files
authored
Merge branch 'v2-maint' into issue_1797
2 parents ab08083 + 1a4c1da commit 33a1b5c

File tree

6 files changed

+33
-4
lines changed

6 files changed

+33
-4
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v2.*
6+
branches:
7+
- v2-maint
8+
pull_request:
9+
branches:
10+
- v2-maint
11+
permissions:
12+
contents: read
13+
jobs:
14+
golangci:
15+
name: lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/setup-go@v3
19+
with:
20+
go-version: "1.20"
21+
- uses: actions/checkout@v3
22+
- name: golangci-lint
23+
uses: golangci/golangci-lint-action@v3
24+
with:
25+
version: latest

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# https://golangci-lint.run/usage/configuration/
2+
linters:
3+
enable:
4+
- misspell

command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func TestCommand_Run_CustomShellCompleteAcceptsMalformedFlags(t *testing.T) {
341341
}{
342342
{testArgs: args{"--undefined"}, expectedOut: "found 0 args"},
343343
{testArgs: args{"--number"}, expectedOut: "found 0 args"},
344-
{testArgs: args{"--number", "fourty-two"}, expectedOut: "found 0 args"},
344+
{testArgs: args{"--number", "forty-two"}, expectedOut: "found 0 args"},
345345
{testArgs: args{"--number", "42"}, expectedOut: "found 0 args"},
346346
{testArgs: args{"--number", "42", "newArg"}, expectedOut: "found 1 args"},
347347
}

context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (cCtx *Context) Lineage() []*Context {
144144
return lineage
145145
}
146146

147-
// Count returns the num of occurences of this flag
147+
// Count returns the num of occurrences of this flag
148148
func (cCtx *Context) Count(name string) int {
149149
if fs := cCtx.lookupFlagSet(name); fs != nil {
150150
if cf, ok := fs.Lookup(name).Value.(Countable); ok {

godoc-current.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ func (cCtx *Context) Bool(name string) bool
653653
Bool looks up the value of a local BoolFlag, returns false if not found
654654

655655
func (cCtx *Context) Count(name string) int
656-
Count returns the num of occurences of this flag
656+
Count returns the num of occurrences of this flag
657657

658658
func (cCtx *Context) Duration(name string) time.Duration
659659
Duration looks up the value of a local DurationFlag, returns 0 if not found

testdata/godoc-v2.x.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ func (cCtx *Context) Bool(name string) bool
653653
Bool looks up the value of a local BoolFlag, returns false if not found
654654

655655
func (cCtx *Context) Count(name string) int
656-
Count returns the num of occurences of this flag
656+
Count returns the num of occurrences of this flag
657657

658658
func (cCtx *Context) Duration(name string) time.Duration
659659
Duration looks up the value of a local DurationFlag, returns 0 if not found

0 commit comments

Comments
 (0)