Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.
This repository was archived by the owner on May 11, 2022. It is now read-only.

improve code quality, second iteration #48

@kamilsk

Description

@kamilsk
http/availability/crawler.go:152:21:warning: error return value not checked (el.Request.Visit(href)) (errcheck)
http/availability/printer.go:73:22:warning: error return value not checked (critical().Fprintf(w, "report %q has error %q\n", site.Name, site.Error)) (errcheck)
http/availability/printer.go:75:23:warning: error return value not checked (critical().Fprintf(ioutil.Discard, "stack trace: %#+v\n", stack) // for future) (errcheck)
http/availability/printer.go:82:37:warning: error return value not checked (colorize(page.StatusCode).Fprintf(w, head, page.StatusCode, page.Location)) (errcheck)
http/availability/printer.go:86:39:warning: error return value not checked (colorize(link.StatusCode).Fprintf(w, foot, link.StatusCode, link.FullLocation(sep))) (errcheck)
http/availability/printer.go:89:38:warning: error return value not checked (colorize(link.StatusCode).Fprintf(w, body, link.StatusCode, link.FullLocation(sep))) (errcheck)
http/availability/printer.go:93:22:warning: error return value not checked (critical().Fprintf(w, "found problems on the site %q\n", site.Name)) (errcheck)
http/availability/printer.go:95:23:warning: error return value not checked (critical().Fprintf(w, "- [%d] %s `%+v`\n", i, problem.Message, problem.Context)) (errcheck)
http/availability/report.go:127::warning: cyclomatic complexity 17 of function (*Site).listen() is high (> 10) (gocyclo)
http/availability/report.go:177::warning: declaration of "found" shadows declaration at report.go:173 (vetshadow)
http/availability/report.go:226:36:warning: exported func NewReadableEventBus returns unexported type chan availability.event, which can be annoying to use (golint)

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions