Skip to content

Commit

Permalink
Run nilaway again (#107)
Browse files Browse the repository at this point in the history
* Run nilaway again

* Remove outdated ref to pflag
  • Loading branch information
FollowTheProcess authored Oct 5, 2024
1 parent f5ff943 commit e355191
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version: "3"

vars:
COV_DATA: coverage.out
PACKAGE: github.com/FollowTheProcess/cli

tasks:
default:
Expand Down Expand Up @@ -63,7 +62,7 @@ tasks:
msg: nilaway not installed, see https://github.com/uber-go/nilaway
cmds:
- golangci-lint run --fix
# - nilaway -include-pkgs="{{.PACKAGE}}" ./... # nilaway doesn't work with go 1.23 yet
- nilaway ./...

docs:
desc: Render the pkg docs locally
Expand Down
4 changes: 3 additions & 1 deletion command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,9 @@ func TestDuplicateSubCommands(t *testing.T) {
)

test.Err(t, err)
test.Equal(t, err.Error(), `subcommand "sub1" already defined`)
if err != nil {
test.Equal(t, err.Error(), `subcommand "sub1" already defined`)
}
}

func TestCommandNoRunNoSub(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/flag/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (f Flag[T]) Get() T {
}

// String implements [fmt.Stringer] for a [Flag], and also implements the String
// part of [pflag.Value], allowing a flag to print itself.
// part of [Value], allowing a flag to print itself.
func (f Flag[T]) String() string { //nolint:gocyclo // No other way of doing this realistically
if f.value == nil {
return ""
Expand Down

0 comments on commit e355191

Please sign in to comment.