Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable more linters and address their findings. #63

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
linters:
# Disable all default linters and enable only revive and formatters before
# new findings by default linters are addressed.
disable-all: true
enable:
- dupword
- errcheck
- errname
- godot
- gofumpt
- goimports
- misspell
- revive
- unconvert
- unused

issues:
exclude-use-default: false
Expand Down
2 changes: 1 addition & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// ErrHelp is the error returned if the -help or -h flag is invoked but no such flag is defined.
// Alias for flag.ErrHelp
// Alias for flag.ErrHelp.
var ErrHelp = flag.ErrHelp

// Parser registers and parses configuration values.
Expand Down
4 changes: 2 additions & 2 deletions value/floats.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ func (iv *float64Value) Set(val string) error {
return err
}

*iv.dest = float64(num)
*iv.dest = num
return nil
}

func (iv *float64Value) String() string {
return strconv.FormatFloat(float64(*iv.dest), 'G', -1, 64)
return strconv.FormatFloat(*iv.dest, 'G', -1, 64)
}