Skip to content

Address various linter complains #34

Address various linter complains

Address various linter complains #34

Triggered via push October 15, 2023 09:37
Status Failure
Total duration 26s
Artifacts

main.yml

on: push
Matrix: tests
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 8 warnings
tests (1.21.x): pkg/cli/cli.go#L52
Error return value of `c.history.SaveToFile` is not checked (errcheck)
tests (1.21.x): pkg/cli/history.go#L23
Error return value of `h.loadFromFile` is not checked (errcheck)
tests (1.21.x): pkg/cli/cli.go#L148
emptyStringTest: replace `len(buffer) == 0` with `buffer == ""` (gocritic)
tests (1.21.x): pkg/cli/cli.go#L64
whyNoLint: include an explanation for nolint directive (gocritic)
tests (1.21.x): pkg/cli/cli.go#L123
whyNoLint: include an explanation for nolint directive (gocritic)
tests (1.21.x): pkg/cli/history.go#L29
octalLiteral: use new octal literal style, 0o644 (gocritic)
tests (1.21.x): pkg/cli/history.go#L60
octalLiteral: use new octal literal style, 0o644 (gocritic)
tests (1.21.x): cmd/wsget/main.go#L67
exitAfterDefer: log.Fatal will exit, and `defer wsInsp.Close()` will not run (gocritic)
tests (1.21.x): pkg/ws/ws.go#L44
only one cuddle assignment allowed before if statement (wsl)
tests (1.21.x): pkg/cli/cli.go#L38
assignments should only be cuddled with other assignments (wsl)
tests (1.21.x): pkg/ws/ws.go#L26
exported: type name will be used as ws.WSConnection by other packages, and that stutters; consider calling this Connection (revive)
tests (1.21.x): pkg/ws/ws.go#L18
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
tests (1.21.x): pkg/formater/formater.go#L69
var-naming: method formatJsonMessage should be formatJSONMessage (revive)
tests (1.21.x): pkg/formater/formater.go#L84
var-naming: method parseJson should be parseJSON (revive)
tests (1.21.x): pkg/formater/json.go#L11
var-naming: type JsonFormater should be JSONFormater (revive)
tests (1.21.x): pkg/formater/json.go#L17
var-naming: func NewJsonFormater should be NewJSONFormater (revive)
tests (1.21.x): pkg/cli/cli.go#L16
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)
tests (1.21.x): pkg/cli/cli.go#L17
var-naming: don't use ALL_CAPS in Go names; use CamelCase (revive)