The problems in the current code base detected by the linters that have been integrated in #62 through GolangCI should be handled by refactoring the affected implementations.
This helps to improve the overall code quality and prevents possible errors.
Remove unused function parameters detected by unparam.
if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary): pkg/prt/printer.go:121:9
} else {
^
exported func Load returns unexported type *builder.builder, which can be annoying to use: pkg/config/builder/builder.go:39:32
assignOp: replace format = format + "\n" with format += "\n": pkg/prt/printer.go:179:4
format = format + "\n"
^
paramTypeCombine: func(v Verbosity, w io.Writer, prefix string, format string, args ...interface{}) could be replaced with func(v Verbosity, w io.Writer, prefix, format string, args ...interface{}): pkg/prt/printer.go:176:1
func (p *printerConfig) withNewLine(v Verbosity, w io.Writer, prefix string, format string, args ...interface{}) {
^
The problems in the current code base detected by the linters that have been integrated in #62 through GolangCI should be handled by refactoring the affected implementations. This helps to improve the overall code quality and prevents possible errors.
(*cmdOptions).prepare
-cmd
is unused: cmd/snowsaw/bootstrap/bootstrap.go:51:30(*cmdOptions).run
-cmd
is unused: cmd/snowsaw/bootstrap/bootstrap.go:100:26(*cmdOptions).run
-args
is unused: cmd/snowsaw/bootstrap/bootstrap.go:100:46NewJsonEncoder
should beNewJSONEncoder
: pkg/config/encoder/json/json.go:34:6ExtensionsJson
should beExtensionsJSON
: pkg/config/encoder/constants.go:26:2format = format + "\n"
withformat += "\n"
: pkg/prt/printer.go:179:4func(v Verbosity, w io.Writer, prefix string, format string, args ...interface{})
could be replaced withfunc(v Verbosity, w io.Writer, prefix, format string, args ...interface{})
: pkg/prt/printer.go:176:1len(parts[0]) == 0
withparts[0] == ""
: pkg/snowblock/task/shell/shell.go:165:5